Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kubernetes-infra-example
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cloud
kubernetes
kubernetes-infra-example
Commits
557728e2
Commit
557728e2
authored
6 months ago
by
Ing. Klára Moravcová
Browse files
Options
Downloads
Patches
Plain Diff
Add docs.
parent
21aa0d45
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+3
-2
3 additions, 2 deletions
README.md
terraform/docs/security_groups.md
+58
-0
58 additions, 0 deletions
terraform/docs/security_groups.md
terraform/docs/sever_groups.md
+23
-0
23 additions, 0 deletions
terraform/docs/sever_groups.md
with
84 additions
and
2 deletions
README.md
+
3
−
2
View file @
557728e2
...
...
@@ -15,7 +15,8 @@ Create openstack application credentials:
```
git clone git@gitlab.ics.muni.cz:cloud/kubernetes/kubernetes-infra-example.git
```
If required you may change the values as needed. (like infrastructure name, cluster size (master nodes, worker nodes groups), etc.)
If required you may change the values as needed. (like infrastructure name, cluster size (master nodes, worker nodes groups), etc.)
-
see
[
docs
](
./terraform/docs/
)
for more information
-
`~/kubernetes-infra-example/terraform/main.tf`
-
Give a path to your public ssh key at:
`ssh_public_key = "~/.ssh/id_rsa.pub"`
...
...
@@ -78,4 +79,4 @@ openstack container delete <container-name>
openstack ec2 credentials list #find credentials which are mentioned in .tf-s3.creds
openstack ec2 credentials delete <access key>
```
\ No newline at end of file
```
This diff is collapsed.
Click to expand it.
terraform/docs/security_groups.md
0 → 100644
+
58
−
0
View file @
557728e2
# Security group
The Kubernetes terraform infrastructure comes with default security group contains default rules.
You can modify or delete these default rules or add custom rules.
Default rule are:
`alltcp, alludp, https4, http4, ssh4, icmp4, lb4`
## Override default rule
Add
`custom_security_group_rules`
to
`main.tf`
and add rule with the key of default rule (e.g.
`http4`
) and add custom values for the rule.
```
custom_security_group_rules = {
http4 = {
description = "custom http"
direction = "ingress"
ethertype = "IPv4"
protocol = "tcp"
port_range_min = 8080
port_range_max = 8080
remote_ip_prefix = "0.0.0.0/0"
}
}
```
## Remove default rule
Add list of rules you want to remove to
`main.tf`
.
Fore example
```
remove_rules = ["ssh4","http4"]
```
## Add custom rule
Add
`custom_security_group_rules`
to
`main.tf`
and add rules:
```
custom_security_group_rules = {
custom_ssh = {
description = "custom ssh"
direction = "ingress"
ethertype = "IPv4"
protocol = "tcp"
port_range_min = 2222
port_range_max = 2222
remote_ip_prefix = "0.0.0.0/0"
}
custom_http = {
description = "custom http"
direction = "ingress"
ethertype = "IPv4"
protocol = "tcp"
port_range_min = 8080
port_range_max = 8080
remote_ip_prefix = "0.0.0.0/0"
}
}
```
This diff is collapsed.
Click to expand it.
terraform/docs/sever_groups.md
0 → 100644
+
23
−
0
View file @
557728e2
# Server groups
The Kubernetes terraform infrastructure allows you to create one or more server groups. The purpose of server groups is to be able to have more types and sizes of instances in the cluster with different flavors (for example GPU flavor).
More server groups can look like this:
```
worker_nodes = [
{
name = "wg-blue"
flavor = "standard.small"
volume_size = 30
count = 2
},
{
name = "wg-gpu"
flavor = "a3.32core-120ram"
volume_size = 30
count = 2
}
]
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment