OpenShift Network Calculator
FAQ
-
Q: What is HostPrefix?
A: Defaults to
9
which means that a subnet of size/23
is allocated to each host; for example, given the default10.128.0.0/14
cluster network, this will allocate10.128.0.0/23
,10.128.2.0/23
,10.128.4.0/23
, and so on. It controlls the number Pods/node. -
Q: What are Cluster Network, Service Network and Machine Network?
A: ClusterNetwork is used by Pods, Service Network is for Services and MachineNetwork is the cluster node network.
-
Q: I can see
"number-of-nodes":{"want":512}
. Do we really need512
nodes?A: It is calculated by dividing the number of Pods by the Pods per nodes. That is,
"number-of-pods": 262142 / "pods-per-node": 508 = "number-of-nodes": 512
. However,"number-of-nodes":{"have":254}
represents the number of nodes in the Machine Network. -
Q: How can we use this calulator effectively?
A: This calculator offers the maximum number of Pods, Services, and nodes for the given network. However, it doesn't imply the obligation to utilize the entire capacity; these values merely represent the scalable size. To begin, you can calculate the number of nodes by dividing the required Pods by
500
. This blog explains how we arrived at the value500
. Additionally, it can potentially go as high as2500
under certain conditions, as indicated in this blog. To adjust the number of Pods in a node, modify the HostPrefix. The calculator also checks for network conflicts within the given network. -
Q: What is the reason behind network conflicts being exclusive to OVN-Kubernetes?
A: The OVN-Kubernetes CNI exhibits network conflicts if the IP ranges
100.88.0.0/16
,100.64.0.0/16
and169.254.169.0/29
(InternalMasqueradeSubnet
) are utilized. The OVN-Kubernetes uses these for theTransitSwitchSubnet
andJoinSubnet
. It is crucial to refrain from using these IP ranges in both the internal and external networks of the cluster to prevent conflicts. TheJoinSubnet
can be customized at the time of OVN-kubernetes migration by specifying thev4InternalSubnet
spec
under thespec.defaultNetwork.ovnKubernetesConfig
object definition. -
Q: What does the
InternalMasqueradeSubnet
represent within the OVN-Kubernetes CNI?A: The
internalMasqueradeSubnet
contains the masquerade addresses in IPv4 CIDR format used internally by OVN-Kubernetes to enable host-to-service traffic. Each host in the cluster is configured with these addresses, as well as the shared gateway bridge interface. The values can be changed after installation. The subnet chosen should not overlap with other networks specified for OVN-Kubernetes as well as other networks used on the host. Additionally, the subnet must be large enough to accommodate 6 IPs (maximum prefix length/29
). When omitted, this means no opinion and the platform is left to choose a reasonable default which is subject to change over time. The current default subnet is169.254.169.0/29
.