You can connect a virtual machine (VM) to a user-defined network (UDN) on the VM’s primary interface. The primary user-defined network replaces the default pod network in your specified namespace. Unlike the pod network, you can define the primary UDN per project, where each project can use its specific subnet and topology.
OpenShift Virtualization supports the namespace-scoped UserDefinedNetwork
and the cluster-scoped ClusterUserDefinedNetwork
custom resource definitions (CRD).
Tenant owners can configure a primary UserDefinedNetwork
CRD to create a network that isolates their namespace from other namespaces without requiring network policies. Cluster administrators can use the ClusterUserDefinedNetwork
CRD to create a shared OVN network across multiple namespaces.
|
You must add the k8s.ovn.org/primary-user-defined-network label when you create a namespace that is to be used with user-defined networks.
|
With the layer 2 topology, OVN-Kubernetes creates an overlay network between nodes. You can use this overlay network to connect VMs on different nodes without having to configure any additional physical networking infrastructure.
The layer 2 topology enables seamless migration of VMs without the need for Network Address Translation (NAT) because persistent IP addresses are preserved across cluster nodes during live migration.
You must consider the following limitations before implementing a primary UDN:
-
You cannot use the virtctl ssh
command to configure SSH access to a VM.
-
You cannot use the oc port-forward
command to forward ports to a VM.
-
You cannot use headless services to access a VM.
-
You cannot define readiness and liveness probes to configure VM health checks.
|
OpenShift Virtualization currently does not support secondary user-defined networks.
|