@@ -143,6 +143,45 @@ After setting the environment variables, execute the following command to genera
143143clusterctl generate cluster capc-cluster --flavor with-kube-vip > capc-cluster-spec.yaml
144144```
145145
146+ ##### Option for Multiple Networks
147+
148+ Multiple networks can be specified at each node configuration in CloudStackMachineTemplate.
149+ This is configured under spec.template.spec.networks, where you can list one or more networks by name or id,
150+ and optionally assign static IP addresses.
151+
152+ When defining multiple networks for a VM in CAPC, the first network listed under spec.template.spec.networks is treated as
153+ the primary network. This primary network must match the network defined in the failure domain’s zone (failureDomains[].zone.network),
154+ either by name or by ID. It is used as the default NIC and is critical for VM boot and cluster communication.
155+
156+ Any networks listed after the primary are considered extra networks. These extra networks are attached as secondary NICs
157+ on the VM and can be used for purposes such as service segmentation or additional routing. Each network entry, primary or
158+ extra can optionally include a static IP address. If an IP is not specified, CloudStack will dynamically allocate one.
159+
160+ For example:
161+
162+ ```yaml
163+ apiVersion: infrastructure.cluster.x-k8s.io/v1beta3
164+ kind: CloudStackMachineTemplate
165+ metadata:
166+ name: capc-cluster-control-plane
167+ namespace: default
168+ spec:
169+ template:
170+ spec:
171+ offering:
172+ name: Large Instance
173+ networks:
174+ - name: cloudstack-network # (optional) default primary network; must match with network at failureDomains.zone.network.name
175+ ip: 10.1.1.21 # (optional) static IP in the primary network
176+
177+ # Additional (extra) networks can be specified below. Use either ' name' or ' id' , and optionally an ' ip' .
178+ - name: cloudstack-network-2 # (optional) extra network by name
179+ ip: 10.1.1.31 # (optional) static IP in this network
180+
181+ - id: a1b2c3d4-5678-90ef-gh12-3456789ijklm # (optional) extra network by ID
182+ ip: 10.1.1.41 # (optional) static IP in this network
183+ ```
184+
146185#### CloudStack Endpoint Credentials Secret (*optional for provided templates when used with provided getting-started process*)
147186
148187A reference to a Kubernetes Secret containing a YAML object containing credentials for accessing a particular CloudStack
0 commit comments