mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
trying xref fix topics map rebase modularizes benefits for mulit nwt docs Addresses Suryas comments Commit three
79 lines
5.2 KiB
Plaintext
79 lines
5.2 KiB
Plaintext
:_mod-docs-content-type: ASSEMBLY
|
|
[id="virt-connecting-vm-to-ovn-secondary-network"]
|
|
= Connecting a virtual machine to an OVN-Kubernetes secondary network
|
|
include::_attributes/common-attributes.adoc[]
|
|
:context: virt-connecting-vm-to-ovn-secondary-network
|
|
|
|
toc::[]
|
|
|
|
ifdef::openshift-rosa,openshift-dedicated[]
|
|
You can connect a VM to an Open Virtual Network (OVN)-Kubernetes secondary network. {VirtProductName} supports the `layer2` topology for OVN-Kubernetes.
|
|
|
|
A `layer2` topology connects workloads by a cluster-wide logical switch. The OVN-Kubernetes Container Network Interface (CNI) plugin uses the Geneve (Generic Network Virtualization Encapsulation) protocol to create 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.
|
|
endif::openshift-rosa,openshift-dedicated[]
|
|
|
|
ifndef::openshift-rosa,openshift-dedicated[]
|
|
You can connect a virtual machine (VM) to an OVN-Kubernetes secondary network. {VirtProductName} supports the `layer2` and `localnet` topologies for OVN-Kubernetes.
|
|
|
|
* A `layer2` topology connects workloads by a cluster-wide logical switch. The OVN-Kubernetes Container Network Interface (CNI) plugin uses the Geneve (Generic Network Virtualization Encapsulation) protocol to create 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.
|
|
|
|
* A `localnet` topology connects the secondary network to the physical underlay. This enables both east-west cluster traffic and access to services running outside the cluster, but it requires additional configuration of the underlying Open vSwitch (OVS) system on cluster nodes.
|
|
|
|
[NOTE]
|
|
====
|
|
An OVN-Kubernetes secondary network is compatible with the xref:../../networking/multiple_networks/secondary_networks/configuring-multi-network-policy.adoc#compatibility-with-multi-network-policy_configuring-additional-network[multi-network policy API] which provides the `MultiNetworkPolicy` custom resource definition (CRD) to control traffic flow to and from VMs. You can use the `ipBlock` attribute to define network policy ingress and egress rules for specific CIDR blocks.
|
|
====
|
|
endif::openshift-rosa,openshift-dedicated[]
|
|
|
|
To configure an OVN-Kubernetes secondary network and attach a VM to that network, perform the following steps:
|
|
|
|
. xref:../../virt/vm_networking/virt-connecting-vm-to-ovn-secondary-network.adoc#virt-connecting-vm-to-ovn-secondary-network[Configure an OVN-Kubernetes secondary network] by creating a network attachment definition (NAD).
|
|
ifndef::openshift-rosa,openshift-dedicated[]
|
|
+
|
|
[NOTE]
|
|
====
|
|
For `localnet` topology, you must xref:../../networking/multiple_networks/secondary_networks/creating-secondary-nwt-ovnk.adoc#configuration-localnet-switched-topology_configuring-additional-network-ovnk[configure an OVS bridge] by creating a `NodeNetworkConfigurationPolicy` object before creating the NAD.
|
|
====
|
|
endif::openshift-rosa,openshift-dedicated[]
|
|
|
|
. xref:../../virt/vm_networking/virt-connecting-vm-to-ovn-secondary-network.adoc#attaching-vm-to-ovn-secondary-nw[Connect the VM to the OVN-Kubernetes secondary network] by adding the network details to the VM specification.
|
|
|
|
[id="creating-ovn-nad_{context}"]
|
|
== Creating an OVN-Kubernetes NAD
|
|
|
|
You can create an OVN-Kubernetes network attachment definition (NAD) by using the {product-title} web console or the CLI.
|
|
|
|
[NOTE]
|
|
====
|
|
Configuring IP address management (IPAM) by specifying the `spec.config.ipam.subnet` attribute in a network attachment definition for virtual machines is not supported.
|
|
====
|
|
|
|
include::modules/virt-creating-layer2-nad-cli.adoc[leveloffset=+2]
|
|
|
|
ifndef::openshift-rosa,openshift-dedicated[]
|
|
include::modules/virt-creating-localnet-nad-cli.adoc[leveloffset=+2]
|
|
endif::openshift-rosa,openshift-dedicated[]
|
|
|
|
include::modules/virt-creating-nad-l2-overlay-console.adoc[leveloffset=+2]
|
|
|
|
ifndef::openshift-rosa,openshift-dedicated[]
|
|
include::modules/virt-creating-nad-localnet-console.adoc[leveloffset=+2]
|
|
endif::openshift-rosa,openshift-dedicated[]
|
|
|
|
[id="attaching-vm-to-ovn-secondary-nw"]
|
|
== Attaching a virtual machine to the OVN-Kubernetes secondary network
|
|
|
|
You can attach a virtual machine (VM) to the OVN-Kubernetes secondary network interface by using the {product-title} web console or the CLI.
|
|
|
|
include::modules/virt-attaching-vm-to-ovn-secondary-nw-cli.adoc[leveloffset=+2]
|
|
|
|
|
|
ifndef::openshift-rosa,openshift-dedicated[]
|
|
[role="_additional-resources"]
|
|
[id="additional-resources_virt-connecting-vm-to-ovn-secondary-network"]
|
|
== Additional resources
|
|
* xref:../../networking/multiple_networks/secondary_networks/creating-secondary-nwt-ovnk.adoc#configuration-ovnk-additional-networks_configuring-additional-network[Creating secondary networks on OVN-Kubernetes]
|
|
* xref:../../networking/networking_operators/k8s-nmstate-about-the-k8s-nmstate-operator.adoc#k8s-nmstate-about-the-k8s-nmstate-operator[About the Kubernetes NMState Operator]
|
|
* xref:../../networking/multiple_networks/primary_networks/about-primary-nwt-nad.adoc#understanding-multiple-networks[Creating primary networks using a NetworkAttachmentDefinition]
|
|
endif::openshift-rosa,openshift-dedicated[]
|