mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-07 00:48:01 +01:00
87 lines
2.3 KiB
Plaintext
87 lines
2.3 KiB
Plaintext
:_mod-docs-content-type: PROCEDURE
|
|
[id="nw-dual-stack-convert_{context}"]
|
|
= Converting to a dual-stack cluster network
|
|
|
|
As a cluster administrator, you can convert your single-stack cluster network to a dual-stack cluster network.
|
|
|
|
[NOTE]
|
|
====
|
|
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.
|
|
====
|
|
|
|
.Prerequisites
|
|
|
|
* You installed the OpenShift CLI (`oc`).
|
|
* You are logged in to the cluster with a user with `cluster-admin` privileges.
|
|
* Your cluster uses the OVN-Kubernetes network plugin.
|
|
* The cluster nodes have IPv6 addresses.
|
|
* You have configured an IPv6-enabled router based on your infrastructure.
|
|
|
|
.Procedure
|
|
|
|
. To specify IPv6 address blocks for the cluster and service networks, create a file containing the following YAML:
|
|
+
|
|
--
|
|
[source,yaml]
|
|
----
|
|
- op: add
|
|
path: /spec/clusterNetwork/-
|
|
value: <1>
|
|
cidr: fd01::/48
|
|
hostPrefix: 64
|
|
- op: add
|
|
path: /spec/serviceNetwork/-
|
|
value: fd02::/112 <2>
|
|
----
|
|
<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.
|
|
|
|
<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.
|
|
--
|
|
|
|
. To patch the cluster network configuration, enter the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc patch network.config.openshift.io cluster \
|
|
--type='json' --patch-file <file>.yaml
|
|
----
|
|
+
|
|
--
|
|
where:
|
|
|
|
`file`:: Specifies the name of the file you created in the previous step.
|
|
--
|
|
+
|
|
.Example output
|
|
[source,text]
|
|
----
|
|
network.config.openshift.io/cluster patched
|
|
----
|
|
|
|
.Verification
|
|
|
|
Complete the following step to verify that the cluster network recognizes the IPv6 address blocks that you specified in the previous procedure.
|
|
|
|
. Display the network configuration:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc describe network
|
|
----
|
|
+
|
|
.Example output
|
|
[source,text]
|
|
----
|
|
Status:
|
|
Cluster Network:
|
|
Cidr: 10.128.0.0/14
|
|
Host Prefix: 23
|
|
Cidr: fd01::/48
|
|
Host Prefix: 64
|
|
Cluster Network MTU: 1400
|
|
Network Type: OVNKubernetes
|
|
Service Network:
|
|
172.30.0.0/16
|
|
fd02::/112
|
|
----
|