|
5 | 5 | // * installing/installing_azure_stack_hub/installing-azure-stack-hub-network-customizations.adoc
|
6 | 6 | // * networking/ovn_kubernetes_network_provider/configuring-hybrid-networking.adoc
|
7 | 7 |
|
| 8 | +ifeval::["{context}" == "configuring-hybrid-networking"] |
| 9 | +:post-install: |
| 10 | +endif::[] |
| 11 | + |
8 | 12 | :_content-type: PROCEDURE
|
9 | 13 | [id="configuring-hybrid-ovnkubernetes_{context}"]
|
10 | 14 | = Configuring hybrid networking with OVN-Kubernetes
|
11 | 15 |
|
12 |
| -You can configure your cluster to use hybrid networking with OVN-Kubernetes. This allows a hybrid cluster that supports different node networking configurations. For example, this is necessary to run both Linux and Windows nodes in a cluster. |
| 16 | +You can configure your cluster to use hybrid networking with the OVN-Kubernetes network plugin. This allows a hybrid cluster that supports different node networking configurations. |
13 | 17 |
|
14 |
| -[IMPORTANT] |
| 18 | +[NOTE] |
15 | 19 | ====
|
16 |
| -You must configure hybrid networking with OVN-Kubernetes during the installation of your cluster. You cannot switch to hybrid networking after the installation process. |
| 20 | +This configuration is necessary to run both Linux and Windows nodes in the same cluster. |
17 | 21 | ====
|
18 | 22 |
|
| 23 | +ifndef::post-install[] |
19 | 24 | .Prerequisites
|
20 | 25 |
|
21 | 26 | * You defined `OVNKubernetes` for the `networking.networkType` parameter in the `install-config.yaml` file. See the installation documentation for configuring {product-title} network customizations on your chosen cloud provider for more information.
|
@@ -87,3 +92,67 @@ Windows Server Long-Term Servicing Channel (LTSC): Windows Server 2019 is not su
|
87 | 92 | . Optional: Back up the `manifests/cluster-network-03-config.yml` file. The
|
88 | 93 | installation program deletes the `manifests/` directory when creating the
|
89 | 94 | cluster.
|
| 95 | +endif::post-install[] |
| 96 | +ifdef::post-install[] |
| 97 | +.Prerequisites |
| 98 | + |
| 99 | +* Install the OpenShift CLI (`oc`). |
| 100 | +* Log in to the cluster with a user with `cluster-admin` privileges. |
| 101 | +* Ensure that the cluster uses the OVN-Kubernetes network plugin. |
| 102 | +
|
| 103 | +.Procedure |
| 104 | + |
| 105 | +. To configure the OVN-Kubernetes hybrid network overlay, enter the following command: |
| 106 | ++ |
| 107 | +[source,terminal] |
| 108 | +---- |
| 109 | +$ oc patch networks.operator.openshift.io cluster --type=merge \ |
| 110 | + -p '{ |
| 111 | + "spec":{ |
| 112 | + "defaultNetwork":{ |
| 113 | + "ovnKubernetesConfig":{ |
| 114 | + "hybridOverlayConfig":{ |
| 115 | + "hybridClusterNetwork":[ |
| 116 | + { |
| 117 | + "cidr": "<cidr>", |
| 118 | + "hostPrefix": <prefix> |
| 119 | + } |
| 120 | + ], |
| 121 | + "hybridOverlayVXLANPort": <overlay_port> |
| 122 | + } |
| 123 | + } |
| 124 | + } |
| 125 | + } |
| 126 | + }' |
| 127 | +---- |
| 128 | ++ |
| 129 | +-- |
| 130 | +where: |
| 131 | + |
| 132 | +`cidr`:: Specify the CIDR configuration used for nodes on the additional overlay network. This CIDR cannot overlap with the cluster network CIDR. |
| 133 | +`hostPrefix`:: Specifies the subnet prefix length to assign to each individual node. For example, if `hostPrefix` is set to `23`, then each node is assigned a `/23` subnet out of the given `cidr`, which allows for 510 (2^(32 - 23) - 2) pod IP addresses. If you are required to provide access to nodes from an external network, configure load balancers and routers to manage the traffic. |
| 134 | +`hybridOverlayVXLANPort`:: Specify a custom VXLAN port for the additional overlay network. This is required for running Windows nodes in a cluster installed on vSphere, and must not be configured for any other cloud provider. The custom port can be any open port excluding the default `4789` port. For more information on this requirement, see the Microsoft documentation on link:https://docs.microsoft.com/en-us/virtualization/windowscontainers/kubernetes/common-problems#pod-to-pod-connectivity-between-hosts-is-broken-on-my-kubernetes-cluster-running-on-vsphere[Pod-to-pod connectivity between hosts is broken]. |
| 135 | + |
| 136 | +[NOTE] |
| 137 | +==== |
| 138 | +Windows Server Long-Term Servicing Channel (LTSC): Windows Server 2019 is not supported on clusters with a custom `hybridOverlayVXLANPort` value because this Windows server version does not support selecting a custom VXLAN port. |
| 139 | +==== |
| 140 | +-- |
| 141 | ++ |
| 142 | +.Example output |
| 143 | +[source,text] |
| 144 | +---- |
| 145 | +network.operator.openshift.io/cluster patched |
| 146 | +---- |
| 147 | + |
| 148 | +. To confirm that the configuration is active, enter the following command. It can take several minutes for the update to apply. |
| 149 | ++ |
| 150 | +[source,terminal] |
| 151 | +---- |
| 152 | +$ oc get network.operator.openshift.io -o jsonpath="{.items[0].spec.defaultNetwork.ovnKubernetesConfig}" |
| 153 | +---- |
| 154 | +endif::post-install[] |
| 155 | + |
| 156 | +ifdef::post-install[] |
| 157 | +:!post-install: |
| 158 | +endif::[] |
0 commit comments