|
| 1 | +## Advanced Setups |
| 2 | + |
| 3 | +To get started with CAPMOX please refer to the [Getting Started](Usage.md#quick-start) section. |
| 4 | + |
| 5 | +## Multiple NICs |
| 6 | + |
| 7 | +If you want to create VMs with multiple network devices, |
| 8 | +You will need to create `InClusterPool` or `GlobalInClusterPool` to manage IPs. |
| 9 | + |
| 10 | +here is a `GlobalInClusterPool` example: |
| 11 | + |
| 12 | +```yaml |
| 13 | +apiVersion: ipam.cluster.x-k8s.io/v1alpha2 |
| 14 | +kind: GlobalInClusterIPPool |
| 15 | +metadata: |
| 16 | + name: shared-inclusterippool |
| 17 | +spec: |
| 18 | + addresses: ${NODE_SECONDARY_IP_RANGES} |
| 19 | + prefix: ${SECONDARY_IP_PREFIX} |
| 20 | + gateway: ${SECONDARY_GATEWAY} |
| 21 | +``` |
| 22 | +
|
| 23 | +In the cluster template flavor=multiple-vlans you can define a secondary network device for the VMs. |
| 24 | +To do that you will need to set extra environment variables along with the required ones: |
| 25 | +
|
| 26 | +```bash |
| 27 | +# The secondary IP ranges for Cluster nodes |
| 28 | +export NODE_SECONDARY_IP_RANGES="[10.10.10.100-10.10.10.150]" |
| 29 | +# The Subnet Mask in CIDR notation for your node secondary IP ranges |
| 30 | +export SECONDARY_IP_PREFIX=24 |
| 31 | +# The secondary gateway for the machines network-config |
| 32 | +export SECONDARY_GATEWAY="10.10.10.254" |
| 33 | +# The secondary dns nameservers for the machines network-config |
| 34 | +export SECONDARY_DNS_SERVERS="[8.8.8.8, 8.8.4.4]" |
| 35 | +# The Proxmox secondary network bridge for VMs |
| 36 | +export SECONDARY_BRIDGE=vmbr2 |
| 37 | +``` |
| 38 | + |
| 39 | +#### Generate a Cluster |
| 40 | + |
| 41 | +```bash |
| 42 | +clusterctl generate cluster test-multiple-vlans \ |
| 43 | + --infrastructure proxmox \ |
| 44 | + --kubernetes-version v1.28.3 \ |
| 45 | + --control-plane-machine-count=1 \ |
| 46 | + --worker-machine-count=2 \ |
| 47 | + --flavor=multiple-vlans > cluster.yaml |
| 48 | +``` |
| 49 | + |
| 50 | +## Dual Stack |
| 51 | + |
| 52 | +Regarding dual-stack support, you can use the following environment variables to define the IPv6 ranges for the VMs: |
| 53 | + |
| 54 | +```bash |
| 55 | +# The IPv6 ranges for Cluster nodes |
| 56 | +export NODE_IPV6_RANGES="[2001:db8:1::1-2001:db8:1::10]" |
| 57 | +# The Subnet Mask in CIDR notation for your node IPv6 ranges |
| 58 | +export IPV6_PREFIX=64 |
| 59 | +# The ipv6 gateway for the machines network-config. |
| 60 | +export IPV6_GATEWAY="2001:db8:1::1" |
| 61 | +``` |
| 62 | + |
| 63 | +#### Generate a Cluster |
| 64 | + |
| 65 | +```bash |
| 66 | +clusterctl generate cluster test-duacl-stack \ |
| 67 | + --infrastructure proxmox \ |
| 68 | + --kubernetes-version v1.28.3 \ |
| 69 | + --control-plane-machine-count=1 \ |
| 70 | + --worker-machine-count=2 \ |
| 71 | + --flavor=dual-stack > cluster.yaml |
| 72 | +``` |
| 73 | + |
| 74 | + |
| 75 | +## Notes |
| 76 | + |
| 77 | +* Clusters with IPV6 IPs only is supported. |
| 78 | +* Multiple NICs & Dual-stack setups can be mixed together. |
| 79 | +* If you're looking for more customized setups, you can create your own cluster template and use it with `clusterctl generate cluster` command. |
| 80 | + |
| 81 | +## API Reference |
| 82 | + |
| 83 | +Please refer to the API reference: |
| 84 | +* [CAPMOX API Reference](https://doc.crds.dev/github.com/ionos-cloud/cluster-api-provider-proxmox). |
0 commit comments