Skip to content

Commit 4ed29f7

Browse files
authored
Merge pull request #75232 from dfitzmau/OSDOCS-8931
2 parents c83c27b + ceb6920 commit 4ed29f7

File tree

2 files changed

+92
-23
lines changed

2 files changed

+92
-23
lines changed

modules/nw-dual-stack-convert.adoc

Lines changed: 84 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
[id="nw-dual-stack-convert_{context}"]
33
= Converting to a dual-stack cluster network
44

5-
As a cluster administrator, you can convert your single-stack cluster network to a dual-stack cluster network.
5+
As a cluster administrator, you can convert your single-stack cluster network to a dual-stack cluster network. After converting to a dual-stack networking, new and existing pods have dual-stack networking enabled.
6+
7+
Converting a single-stack cluster network to a dual-stack cluster network consists of creating patches and applying them to the cluster's network and infrastructure.
68

79
[NOTE]
810
====
9-
After converting to dual-stack networking only newly created pods are assigned IPv6 addresses. Any pods created before the conversion must be recreated to receive an IPv6 address.
11+
Each patch operation that changes `clusterNetwork`, `serviceNetwork`, `apiServerInternalIPs`, and `ingressIP` objects triggers a restart of the cluster. Changing the `MachineNetworks` object does not cause a reboot of the cluster.
1012
====
1113

1214
.Prerequisites
@@ -19,9 +21,8 @@ After converting to dual-stack networking only newly created pods are assigned I
1921
2022
.Procedure
2123

22-
. To specify IPv6 address blocks for the cluster and service networks, create a file containing the following YAML:
24+
. To specify IPv6 address blocks for the cluster and service networks, create a YAML configuration patch file that has a similar configuration to the following example:
2325
+
24-
--
2526
[source,yaml]
2627
----
2728
- op: add
@@ -33,45 +34,71 @@ After converting to dual-stack networking only newly created pods are assigned I
3334
path: /spec/serviceNetwork/-
3435
value: fd02::/112 <2>
3536
----
36-
<1> Specify an object with the `cidr` and `hostPrefix` fields. The host prefix must be `64` or greater. The IPv6 CIDR prefix must be large enough to accommodate the specified host prefix.
37-
37+
<1> Specify an object with the `cidr` and `hostPrefix` fields. The host prefix must be `64` or greater. The IPv6 Classless Inter-Domain Routing (CIDR) prefix must be large enough to accommodate the specified host prefix.
3838
<2> Specify an IPv6 CIDR with a prefix of `112`. Kubernetes uses only the lowest 16 bits. For a prefix of `112`, IP addresses are assigned from `112` to `128` bits.
39-
--
4039
41-
. To patch the cluster network configuration, enter the following command:
40+
. Patch the cluster network configuration by entering the following command in your CLI:
4241
+
43-
[source,terminal]
42+
[source,terminal,subs="+quotes"]
4443
----
45-
$ oc patch network.config.openshift.io cluster \
44+
$ oc patch network.config.openshift.io cluster \// <1>
4645
--type='json' --patch-file <file>.yaml
4746
----
47+
<1> Where `file` specifies the name of your created YAML file.
48+
+
49+
.Example output
50+
[source,text]
51+
----
52+
network.config.openshift.io/cluster patched
53+
----
54+
55+
. To specify IPv6 Virtual IPs (VIPs) for API and Ingress services for your cluster, create a YAML configuration patch file that has a similar configuration to the following example:
4856
+
49-
--
50-
where:
57+
[source,yaml]
58+
----
59+
- op: add
60+
path: /spec/platformSpec/baremetal/machineNetworks/- <1>
61+
value: fd2e:6f44:5dd8::/64
62+
- op: add
63+
path: /spec/platformSpec/baremetal/apiServerInternalIPs/- <2>
64+
value: fd2e:6f44:5dd8::4
65+
- op: add
66+
path: /spec/platformSpec/baremetal/ingressIPs/-
67+
value: fd2e:6f44:5dd8::5
68+
----
69+
<1> Ensure that you specify an address block for the `machineNetwork` network where your machines operate. You must select both API and Ingress IP addresses for the machine network.
70+
<2> Ensure that you specify each file path according to your platform. The example demonstrates a file path on a bare-metal platform.
5171
52-
`file`:: Specifies the name of the file you created in the previous step.
53-
--
72+
. Patch the cluster's infrastructure by entering the following command in your CLI:
73+
+
74+
[source,terminal,subs="+quotes"]
75+
----
76+
$ oc patch infrastructure cluster \// <1>
77+
--type='json' --patch-file <file>.yaml
78+
----
79+
<1> Where `file` specifies the name of your created YAML file.
5480
+
5581
.Example output
5682
[source,text]
5783
----
58-
network.config.openshift.io/cluster patched
84+
infrastructure/cluster patched
5985
----
6086

6187
.Verification
6288

63-
Complete the following step to verify that the cluster network recognizes the IPv6 address blocks that you specified in the previous procedure.
64-
65-
. Display the network configuration:
89+
. Show the cluster network configuration by entering the following command in your CLI:
6690
+
6791
[source,terminal]
6892
----
6993
$ oc describe network
7094
----
95+
96+
. Verify the successful installation of the patch on the network configuration by checking that the cluster network configuration recognizes the IPv6 address blocks that you specified in the YAML file.
7197
+
7298
.Example output
7399
[source,text]
74100
----
101+
# ...
75102
Status:
76103
Cluster Network:
77104
Cidr: 10.128.0.0/14
@@ -83,4 +110,43 @@ Status:
83110
Service Network:
84111
172.30.0.0/16
85112
fd02::/112
113+
# ...
114+
----
115+
116+
. Show the cluster infrastructure configuration by entering the following command in your CLI:
117+
+
118+
[source,terminal]
119+
----
120+
$ oc describe network
121+
----
122+
123+
. Verify the successful installation of the patch on the cluster infrastructure by checking that the infrastructure recognizes the IPv6 address blocks that you specified in the YAML file.
124+
+
125+
.Example output
126+
[source,text]
127+
----
128+
# ...
129+
spec:
130+
# ...
131+
platformSpec:
132+
baremetal:
133+
apiServerInternalIPs:
134+
- 192.168.123.5
135+
- fd2e:6f44:5dd8::4
136+
ingressIPs:
137+
- 192.168.123.10
138+
- fd2e:6f44:5dd8::5
139+
status:
140+
# ...
141+
platformStatus:
142+
baremetal:
143+
apiServerInternalIP: 192.168.123.5
144+
apiServerInternalIPs:
145+
- 192.168.123.5
146+
- fd2e:6f44:5dd8::4
147+
ingressIP: 192.168.123.10
148+
ingressIPs:
149+
- 192.168.123.10
150+
- fd2e:6f44:5dd8::5
151+
# ...
86152
----

networking/ovn_kubernetes_network_provider/converting-to-dual-stack.adoc

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@ include::_attributes/common-attributes.adoc[]
66

77
toc::[]
88

9-
As a cluster administrator, you can convert your IPv4 single-stack cluster to a dual-network cluster network that supports IPv4 and IPv6 address families.
10-
After converting to dual-stack, all newly created pods are dual-stack enabled.
9+
As a cluster administrator, you can convert your IPv4 single-stack cluster to a dual-network cluster network that supports IPv4 and IPv6 address families. After converting to dual-stack networking, new and existing pods have dual-stack networking enabled.
1110

12-
[NOTE]
11+
Clusters provisioned on bare metal, {ibm-power-name}, {ibm-z-name} infrastructure, {sno}, and {vmw-full} support dual-stack networking.
12+
13+
[IMPORTANT]
1314
====
14-
* While using dual-stack networking, you cannot use IPv4-mapped IPv6 addresses, such as `::FFFF:198.51.100.1`, where IPv6 is required.
15-
* A dual-stack network is supported on clusters provisioned on bare metal, {ibm-power-name}, {ibm-z-name} infrastructure, {sno}, and VMware vSphere.
15+
When using dual-stack networking where IPv6 is required, you cannot use IPv4-mapped IPv6 addresses, such as `::FFFF:198.51.100.1`.
1616
====
1717

18+
// Converting to a dual-stack cluster network
1819
include::modules/nw-dual-stack-convert.adoc[leveloffset=+1]
20+
21+
// Converting to a single-stack cluster network
1922
include::modules/nw-dual-stack-convert-back-single-stack.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)