mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
64 lines
1.9 KiB
Plaintext
64 lines
1.9 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * networking/ovn_kubernetes_network_provider/configure-ovn-kubernetes-subnets.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="nw-ovn-kubernetes-change-join-subnet_{context}"]
|
|
= Configuring the OVN-Kubernetes join subnet
|
|
|
|
You can change the join subnet used by OVN-Kubernetes to avoid conflicting with any existing subnets already in use in your environment.
|
|
|
|
.Prerequisites
|
|
|
|
* Install the OpenShift CLI (`oc`).
|
|
* Log in to the cluster with a user with `cluster-admin` privileges.
|
|
* Ensure that the cluster uses the OVN-Kubernetes network plugin.
|
|
|
|
.Procedure
|
|
|
|
* To change the OVN-Kubernetes join subnet, enter the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc patch network.operator.openshift.io cluster --type='merge' \
|
|
-p='{"spec":{"defaultNetwork":{"ovnKubernetesConfig":
|
|
{"ipv4":{"internalJoinSubnet": "<join_subnet>"},
|
|
"ipv6":{"internalJoinSubnet": "<join_subnet>"}}}}}'
|
|
----
|
|
+
|
|
--
|
|
where:
|
|
|
|
`<join_subnet>`:: Specifies an IP address subnet for internal use by OVN-Kubernetes. The subnet must be larger than the number of nodes in the cluster and it must be large enough to accommodate one IP address per node in the cluster. This subnet cannot overlap with any other subnets used by {product-title} or on the host itself. The default value for IPv4 is `100.64.0.0/16` and the default value for IPv6 is `fd98::/64`.
|
|
--
|
|
+
|
|
.Example output
|
|
[source,text]
|
|
----
|
|
network.operator.openshift.io/cluster patched
|
|
----
|
|
|
|
.Verification
|
|
|
|
* To confirm that the configuration is active, enter the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc get network.operator.openshift.io \
|
|
-o jsonpath="{.items[0].spec.defaultNetwork}"
|
|
----
|
|
+
|
|
The command operation can take up to 30 minutes for this change to take effect.
|
|
+
|
|
.Example output
|
|
----
|
|
{
|
|
"ovnKubernetesConfig": {
|
|
"ipv4": {
|
|
"internalJoinSubnet": "100.64.1.0/16"
|
|
},
|
|
},
|
|
"type": "OVNKubernetes"
|
|
}
|
|
----
|