Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

How to Enable Multi-Interface Pods in a Kubernetes Environment

Note:

This topic covers Contrail Networking in Kubernetes-orchestrated environments that are using Contrail Networking Release 21-based releases.

Starting in Release 22.1, Contrail Networking evolved into Cloud-Native Contrail Networking. Cloud-Native Contrail Networking offers significant enhancements to optimize networking performance in Kubernetes-orchestrated environments. We recommend using Cloud-Native Contrail for networking in most Kubernetes-orchestrated environments.

For general information about Cloud-Native Contrail, see the Cloud-Native Contrail Networking Techlibrary homepage.

For information about enabling a multi-interface pod using Cloud-Native Contrail, see Enable Pods with Multiple Network Interfaces.

Contrail Networking, when used as the CNI in a Kubernetes environment, natively has the capability to create a Kubernetes pod with multiple interfaces.

This procedure demonstrates how to configure a multi-interface pod in Kubernetes running Contrail Networking Release 2008. In this example, two virtual networks are created and a Kubernetes pod has interfaces in each virtual network.

To configure a multi-interface pod:

  1. Create two virtual networks in Contrail.

    In this example, two virtual networks—red-net and green-net—are created.

  2. Create a pod with network interfaces in both networks.

    In this example, a pod with interfaces in red-net and green-net is created.

  3. Connect to the pod to check both network interfaces.

    In this sample output, the pod has a network interface in each virtual network as well as an interface in the default pod network.