Skip to content

Commit 9647f6d

Browse files
mchiapperohardys
authored andcommitted
Introduce dual-stack in the multi-node downstream example
Update the multi-node example to define a dual-stack deployment. Signed-off-by: Marco Chiappero <[email protected]> (cherry picked from commit 322958c)
1 parent 5e4bbb3 commit 9647f6d

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

asciidoc/product/atip-automated-provision.adoc

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,7 @@ To do that, the following file (`capi-provisioning-example.yaml`) must be create
979979
[NOTE]
980980
====
981981
- Only values between `$\{...\}` must be replaced with the real values.
982-
- The `VIP` address is a reserved IP address that is not assigned to any node and is used to configure the load balancer.
982+
- The `VIP` address is a reserved IP address that is not assigned to any node and is used to configure the load balancer. In a dual-stack cluster, both an IPv4 and IPv6 can be specified, but in the following examples priority will be given to the IPv4 address.
983983
====
984984

985985
Below is the cluster definition, where the cluster network can be configured using the `pods` and the `services` blocks. Also, it contains the references to the control plane and the infrastructure (using the `Metal^3^` provider) objects to be used.
@@ -996,9 +996,11 @@ spec:
996996
pods:
997997
cidrBlocks:
998998
- 192.168.0.0/18
999+
- fd00:1234:4321::/48
9991000
services:
10001001
cidrBlocks:
10011002
- 10.96.0.0/12
1003+
- fd00:5678:8765:4321::/112
10021004
controlPlaneRef:
10031005
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
10041006
kind: RKE2ControlPlane
@@ -1009,7 +1011,12 @@ spec:
10091011
name: multinode-cluster
10101012
----
10111013

1012-
The `Metal3Cluster` object specifies the control-plane endpoint that uses the `VIP` address already reserved (replacing the `$\{EDGE_VIP_ADDRESS\}`) to be configured and the `noCloudProvider` because the three bare-metal nodes are used.
1014+
[NOTE]
1015+
====
1016+
Both single-stack and dual-stack deployments are possible, remove the IPv6 CIDRs and IPv6 VIP addresses (in the subsequent sections) for an IPv4 only cluster
1017+
====
1018+
1019+
The `Metal3Cluster` object specifies the control-plane endpoint that uses the `VIP` address already reserved (replacing the `$\{EDGE_VIP_ADDRESS_IPV4\}`) to be configured and the `noCloudProvider` because the three bare-metal nodes are used.
10131020
[,yaml]
10141021
----
10151022
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
@@ -1019,7 +1026,7 @@ metadata:
10191026
namespace: default
10201027
spec:
10211028
controlPlaneEndpoint:
1022-
host: ${EDGE_VIP_ADDRESS}
1029+
host: ${EDGE_VIP_ADDRESS_IPV4}
10231030
port: 6443
10241031
noCloudProvider: true
10251032
----
@@ -1028,11 +1035,11 @@ The `RKE2ControlPlane` object specifies the control-plane configuration to be us
10281035

10291036
* The number of replicas to be used (in this case, three).
10301037
* The advertisement mode to be used by the Load Balancer (`address` uses the L2 implementation), as well as the address to be used (replacing the `$\{EDGE_VIP_ADDRESS\}` with the `VIP` address).
1031-
* The `serverConfig` with the `CNI` plug-in to be used (in this case, `Cilium`), and the `tlsSan` to be used to configure the `VIP` address.
1038+
* The `serverConfig` with the `CNI` plug-in to be used (in this case, `Cilium`), and the additional `VIP` address(es) and name(s) to be listed under `tlsSan`.
10321039
* The agentConfig block contains the `Ignition` format to be used and the `additionalUserData` to be used to configure the `RKE2` node with information like:
10331040
** The systemd service named `rke2-preinstall.service` to replace automatically the `BAREMETALHOST_UUID` and `node-name` during the provisioning process using the Ironic information.
10341041
** The `storage` block which contains the Helm charts to be used to install the `MetalLB` and the `endpoint-copier-operator`.
1035-
** The `metalLB` custom resource file with the `IPaddressPool` and the `L2Advertisement` to be used (replacing `$\{EDGE_VIP_ADDRESS\}` with the `VIP` address).
1042+
** The `metalLB` custom resource file with the `IPaddressPool` and the `L2Advertisement` to be used (replacing `$\{EDGE_VIP_ADDRESS_IPV4\}` with the `VIP` address).
10361043
** The `endpoint-svc.yaml` file to be used to configure the `kubernetes-vip` service to be used by the `MetalLB` to manage the `VIP` address.
10371044
* The last block of information contains the Kubernetes version to be used. The `$\{RKE2_VERSION\}` is the version of `RKE2` to be used replacing this value (for example, `{version-kubernetes-rke2}`).
10381045

@@ -1059,8 +1066,10 @@ spec:
10591066
serverConfig:
10601067
cni: cilium
10611068
tlsSan:
1062-
- $\{EDGE_VIP_ADDRESS}
1063-
- https://$\{EDGE_VIP_ADDRESS}.sslip.io
1069+
- $\{EDGE_VIP_ADDRESS_IPV4}
1070+
- $\{EDGE_VIP_ADDRESS_IPV6}
1071+
- https://$\{EDGE_VIP_ADDRESS_IPV4}.sslip.io
1072+
- https://$\{EDGE_VIP_ADDRESS_IPV6}.sslip.io
10641073
agentConfig:
10651074
format: ignition
10661075
additionalUserData:
@@ -1147,7 +1156,8 @@ spec:
11471156
namespace: metallb-system
11481157
spec:
11491158
addresses:
1150-
- $\{EDGE_VIP_ADDRESS}/32
1159+
- $\{EDGE_VIP_ADDRESS_IPV4}/32
1160+
- $\{EDGE_VIP_ADDRESS_IPV6}/128
11511161
serviceAllocation:
11521162
priority: 100
11531163
namespaces:
@@ -1176,6 +1186,7 @@ spec:
11761186
labels:
11771187
serviceType: kubernetes-vip
11781188
spec:
1189+
ipFamilyPolicy: PreferDualStack
11791190
ports:
11801191
- name: rke2-api
11811192
port: 9345

0 commit comments

Comments
 (0)