Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

L2 Pod with Kernel Interface (Access Mode)

SUMMARY Read this topic to learn how to add a user pod with a kernel/veth access-mode interface to an instance of the cloud-native router.

Overview

You can configure a user pod with a Layer 2 access-mode kernel interface and attach it to the JCNR instance. The Juniper Cloud-Native Router must have an L2 interface configured at the time of deployment. Your high-level tasks are:

  • Define and apply a network attachment definition (NAD)—The NAD file defines the required configuration for Multus to invoke the JCNR-CNI and create a network to attach the pod interface to.

  • Define and apply a pod YAML file to your cloud-native router cluster—The pod YAML contains the pod specifications and an annotation to the network created by the JCNR-CNI.

    Note:

    Please review the JCNR Use-Cases and Configuration Overview topic for more information on NAD and pod YAML files.

Configuration Example

  1. Here is an example NAD to create a Layer 2 kernel/veth access-mode interface with static IPAM:

    The NAD defines a bridge domain bd100 under which a veth type pod interface should be attached in the virtual-switch instance.

    It also defines a static IP address to be assigned to the pod interface.
  2. Apply the NAD manifest to create the network.
  3. Verify the NAD is created.
  4. Here is an example yaml to create a pod attached to the vswitch-pod1-bd100 network:

    The pod attaches to the router instance using the k8s.v1.cni.cncf.io/networks annotation

    .
  5. Apply the pod manifest.
  6. Verify the pod is running.
  7. Describe the pod to verify a secondary interface is created and attached to the vswitch-pod1-bd100 network. (The output is trimmed for brevity).
  8. Verify the vRouter has the corresponding interface created. Access the vRouter CLI and issue the vif --list command.Note that the interface type is Virtual and the Vlan mode is set to access with the Vlan ID set to 100. The VRF is always 0 for L2 interfaces.