# Advanced Cluster Configuration

MetaKube will by default create all resources in OpenStack it needs for a cluster. You may want to manage them yourself, if you have special requirements.

> [!WARNING]
>
> MetaKube may not prevent you from misconfiguring the network. If you're unsure of what you need, please contact our support.

## OpenStack Security Groups

The Security Group created by default will allow the following traffic to/from your nodes:

- Any UCP, TCP egress
- Any UDP, TCP ingress between your nodes
- Any TCP ingress to port 22 for SSH (Nodes without floating IPs are still not internet routable and SSH password authentication is disabled)
- Any TCP ingress from the node subnet on high ports 30000 to 32767
- This allows Octavia Load Balancers managed by Kubernetes to forward traffic to the nodes on the high ports used by `NodePort` (and `LoadBalancer`) type services.

> [!CAUTION]
>
> **Danger**
>
> Do not modify the Security Group created by MetaKube (`metakube-<cluster-id>`). It is managed by us and might receive automatic changes.
>
> OpenStack has a Security Group called `default`. This Security Group allows egress and traffic between members of the Security Group. It's not suitable for MetaKube clusters, since Octavia Load Balancers managed by Kubernetes won't work.
>
> Please do not alter the rules in that Security Group!

## OpenStack Network ID

You may want to use an existing OpenStack network if you want more control over settings such as router configuration.

> [!NOTE]
>
> **Info**
>
> MetaKube currently does not support IPv6 or mixed networks.

## OpenStack Subnet ID

> [!NOTE]
>
> **Info**
>
> This option is mutually exclusive with [specifying a subnet CIDR](<#subnet-cidr>).

> [!NOTE]
>
> **Info**
>
> This option is only available in the [MetaKube Terraform Provider](<https://registry.terraform.io/providers/syseleven/metakube/latest>).

You may specify an existing OpenStack subnet for your nodes.

Only consider this option if you require more IPs for Kubernetes nodes or if the 192.168.1.0/24 IP range collides with another network, for example that's connected through VPN.

## Subnet CIDR

> [!NOTE]
>
> **Info**
>
> This option is mutually exclusive with [specifying an existing subnet](<#openstack-subnet-id>).

If specified, MetaKube will *create* a subnet with the given CIDR.

By default, the nodes will be deployed in a subnet with the `192.168.1.0/24` IP range. That may collide with other networks you control that need to be routable without NAT. Or you may require a bigger IP space for more worker nodes. You can change the IP range for the node subnet to a CIDR of your choice.
