As a cluster administrator, you can configure the OVN-Kubernetes Container Network Interface (CNI) cluster network provider to allow Linux and Windows nodes to host Linux and Windows workloads, respectively.

Configuring hybrid networking with OVN-Kubernetes

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.

You must configure hybrid networking with OVN-Kubernetes during the installation of your cluster. You cannot switch to hybrid networking after the installation process.

  • You defined OVNKubernetes for the networking.networkType parameter in the install-config.yaml file. See the installation documentation for configuring OKD network customizations on your chosen cloud provider for more information.

  1. Use the following command to create manifests:

    $ ./openshift-install create manifests --dir=<installation_directory> (1)
    1 For <installation_directory>, specify the name of the directory that contains the install-config.yaml file for your cluster.
  2. Create a file that is named cluster-network-03-config.yml in the <installation_directory>/manifests/ directory:

    $ touch <installation_directory>/manifests/cluster-network-03-config.yml (1)
    1 For <installation_directory>, specify the directory name that contains the manifests/ directory for your cluster.

    After creating the file, several network configuration files are in the manifests/ directory, as shown:

    $ ls -1 <installation_directory>/manifests/cluster-network-*
    Example output
  3. Open the cluster-network-03-config.yml file and configure OVN-Kubernetes with hybrid networking. For example:

    kind: Network
      creationTimestamp: null
      name: cluster
    spec: (1)
      clusterNetwork: (2)
      - cidr:
        hostPrefix: 23
        policy: {}
        type: OVNKubernetes (3)
            hybridClusterNetwork: (4)
            - cidr:
              hostPrefix: 23
    status: {}
    1 The parameters for the spec parameter are only an example. Specify your configuration for the Cluster Network Operator in the custom resource.
    2 Specify the CIDR configuration used when adding nodes.
    3 Specify OVNKubernetes as the Container Network Interface (CNI) cluster network provider.
    4 Specify the CIDR configuration used for nodes on the additional overlay network. The hybridClusterNetwork CIDR cannot overlap with the clusterNetwork CIDR.
  4. Optional: Back up the <installation_directory>/manifests/cluster-network-03-config.yml file. The installation program deletes the manifests/ directory when creating the cluster.

Complete any further installation configurations, and then create your cluster. Hybrid networking is enabled when the installation process is finished.