Skip to content
Snippets Groups Projects
Commit 557728e2 authored by Ing. Klára Moravcová's avatar Ing. Klára Moravcová
Browse files

Add docs.

parent 21aa0d45
No related branches found
No related tags found
No related merge requests found
......@@ -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
```
# 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"
}
}
```
# 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
}
]
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment