Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions modules/virt-creating-localnet-nad-cli.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
----
<1> The name of the configuration object.
<2> Specifies the nodes to which the node network configuration policy is to be applied. The recommended node selector value is `node-role.kubernetes.io/worker: ''`.
<3> The name of the additional network from which traffic is forwarded to the OVS bridge. This attribute must match the value of the `spec.config.name` field of the `NetworkAttachmentDefinition` object that defines the OVN-Kubernetes additional network.
<3> The name of the additional network from which traffic is forwarded to the OVS bridge. This attribute must match the value of the `spec.config.physicalNetworkName` field of the `NetworkAttachmentDefinition` object that defines the OVN-Kubernetes additional network.
<4> The name of the OVS bridge on the node. This value is required if the `state` attribute is `present`.
<5> The state of the mapping. Must be either `present` to add the mapping or `absent` to remove the mapping. The default value is `present`.
+
Expand All @@ -58,21 +58,23 @@ spec:
config: |2
{
"cniVersion": "0.3.1", <1>
"name": "localnet-network", <2>
"name": "localnet1", <2>
"type": "ovn-k8s-cni-overlay", <3>
"topology": "localnet", <4>
"mtu": 1500, <5>
"vlanID": 200, <6>
"netAttachDefName": "default/localnet-network" <7>
"physicalNetworkName": "localnet-network", <5>
"mtu": 1500, <6>
"vlanID": 200, <7>
"netAttachDefName": "default/localnet-network" <8>
}
----
<1> The CNI specification version. The required value is `0.3.1`.
<2> The name of the network. This attribute must match the value of the `spec.desiredState.ovn.bridge-mappings.localnet` field of the `NodeNetworkConfigurationPolicy` object that defines the OVS bridge mapping.
<2> The name of the network.
<3> The name of the CNI plug-in to be configured. The required value is `ovn-k8s-cni-overlay`.
<4> The topological configuration for the network. The required value is `localnet`.
<5> Optional: The maximum transmission unit (MTU) value. If you do not set a value, the Cluster Network Operator (CNO) sets a default MTU value by calculating the difference among the underlay MTU of the primary network interface, the overlay MTU of the pod network, and byte capacity of any enabled features, such as IPsec.
<6> Optionally, for more fine-grained network management, you can configure a virtual LAN (VLAN) ID for the NAD. VMs that use this NAD have an interface that can communicate only with devices that use the same VLAN ID (`200` in this example).
<7> The value of the `namespace` and `name` fields in the `metadata` stanza of the `NetworkAttachmentDefinition` object.
<5> The name of the host's physical network interface, to which the pod's new network interface will be attached. This setting can be reused by multiple NADs. Note that `physicalNetworkName` must match the value of the `spec.desiredState.ovn.bridge-mappings.localnet` field of the `NodeNetworkConfigurationPolicy` object that defines the OVS bridge mapping.
<6> Optional: The maximum transmission unit (MTU) value. If you do not set a value, the Cluster Network Operator (CNO) sets a default MTU value by calculating the difference between the underlay MTU of the primary network interface, the overlay MTU of the pod network, and the byte capacity of any enabled features, such as IPsec encryption.
<7> Optional: The virtual LAN (VLAN) ID for the NAD. VMs that use this NAD have an interface that can communicate only with devices that use the same VLAN ID. In this example, the VLAN ID is `200`.
<8> The value of the `namespace` and `name` fields in the `metadata` stanza of the `NetworkAttachmentDefinition` object.

. Apply the manifest:
+
Expand Down