Skip to content

Commit dca9f3f

Browse files
authored
Merge pull request #56695 from jboxman-rh/OSDOCS-4976
OSDOCS-4976: Describe expanding cluster network range
2 parents 2d96d99 + 6af6c8b commit dca9f3f

File tree

3 files changed

+113
-0
lines changed

3 files changed

+113
-0
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,6 +1132,8 @@ Topics:
11321132
File: changing-cluster-network-mtu
11331133
- Name: Configuring the node port service range
11341134
File: configuring-node-port-service-range
1135+
- Name: Configuring the cluster network IP address range
1136+
File: configuring-cluster-network-range
11351137
- Name: Configuring IP failover
11361138
File: configuring-ipfailover
11371139
- Name: Configuring interface-level network sysctls
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/configuring-cluster-network-range.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="nw-cluster-network-range-edit_{context}"]
7+
= Expanding the cluster network IP address range
8+
9+
You can expand the IP address range for the cluster network. Because this change requires rolling out a new Operator configuration across the cluster, it can take up to 30 minutes to take effect.
10+
11+
.Prerequisites
12+
13+
* Install the OpenShift CLI (`oc`).
14+
* Log in to the cluster with a user with `cluster-admin` privileges.
15+
* Ensure that the cluster uses the OVN-Kubernetes network plugin.
16+
17+
.Procedure
18+
19+
. To obtain the cluster network range and host prefix for your cluster, enter the following command:
20+
+
21+
[source,terminal]
22+
----
23+
$ oc get network.operator.openshift.io \
24+
-o jsonpath="{.items[0].spec.clusterNetwork}"
25+
----
26+
+
27+
.Example output
28+
[source,text]
29+
----
30+
[{"cidr":"10.217.0.0/22","hostPrefix":23}]
31+
----
32+
33+
. To expand the cluster network IP address range, enter the following command. Use the CIDR IP address range and host prefix returned from the output of the previous command.
34+
+
35+
[source,terminal]
36+
----
37+
$ oc patch Network.config.openshift.io cluster --type='merge' --patch \
38+
'{
39+
"spec":{
40+
"clusterNetwork": [ {"cidr":"<network>/<cidr>","hostPrefix":<prefix>} ],
41+
"networkType": "OVNKubernetes"
42+
}
43+
}'
44+
----
45+
+
46+
--
47+
where:
48+
49+
`<network>`:: Specifies the network part of the `cidr` field that you obtained from the previous step. You cannot change this value.
50+
`<cidr>`:: Specifies the network prefix length. For example, `14`. Change this value to a smaller number than the value from the output in the previous step to expand the cluster network range.
51+
`<prefix>`:: Specifies the current host prefix for your cluster. This value must be the same value for the `hostPrefix` field that you obtained from the previous step.
52+
--
53+
+
54+
.Example command
55+
[source,terminal]
56+
----
57+
$ oc patch Network.config.openshift.io cluster --type='merge' --patch \
58+
'{
59+
"spec":{
60+
"clusterNetwork": [ {"cidr":"10.217.0.0/14","hostPrefix": 23} ],
61+
"networkType": "OVNKubernetes"
62+
}
63+
}'
64+
----
65+
+
66+
.Example output
67+
[source,text]
68+
----
69+
network.config.openshift.io/cluster patched
70+
----
71+
72+
. To confirm that the configuration is active, enter the following command. It can take up to 30 minutes for this change to take effect.
73+
+
74+
[source,terminal]
75+
----
76+
$ oc get network.operator.openshift.io \
77+
-o jsonpath="{.items[0].spec.clusterNetwork}"
78+
----
79+
+
80+
.Example output
81+
[source,text]
82+
----
83+
[{"cidr":"10.217.0.0/14","hostPrefix":23}]
84+
----
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
:_content-type: ASSEMBLY
2+
[id="configuring-cluster-network-range"]
3+
= Configuring the cluster network range
4+
include::_attributes/common-attributes.adoc[]
5+
:context: configuring-cluster-network-range
6+
7+
toc::[]
8+
9+
As a cluster administrator, you can expand the cluster network range after cluster installation. You might want to expand the cluster network range if you need more IP addresses for additional nodes.
10+
11+
For example, if you deployed a cluster and specified `10.128.0.0/19` as the cluster network range and a host prefix of `23`, you are limited to 16 nodes. You can expand that to 510 nodes by changing the CIDR mask on a cluster to `/14`.
12+
13+
When expanding the cluster network address range, your cluster must use the xref:../networking/ovn_kubernetes_network_provider/about-ovn-kubernetes.adoc#about-ovn-kubernetes[OVN-Kubernetes network plugin]. Other network plugins are not supported.
14+
15+
The following limitations apply when modifying the cluster network IP address range:
16+
17+
- The CIDR mask size specified must always be smaller than the currently configured CIDR mask size, because you can only increase IP space by adding more nodes to an installed cluster
18+
- The host prefix cannot be modified
19+
- Pods that are configured with an overridden default gateway must be recreated after the cluster network expands
20+
21+
include::modules/nw-cluster-network-range-edit.adoc[leveloffset=+1]
22+
23+
[role="_additional-resources"]
24+
[id="configuring-cluster-network-range-additional-resources"]
25+
== Additional resources
26+
27+
* xref:../networking/ovn_kubernetes_network_provider/about-ovn-kubernetes.adoc#about-ovn-kubernetes[About the OVN-Kubernetes network plugin]

0 commit comments

Comments
 (0)