Install multus-cni using TMC Catalog

Reading Time: 3 mins


Multus CNI is a container network interface (CNI) plugin for K8s that enables attaching multiple network interfaces to pods. Normally, when you deploy a pod, it will have single interface. so using Multus, you will be able to attach multiple interfaces to pod. This post explains how to install the Multus package onto a Tanzu Kubernetes (workload) cluster and use it to create pods with multiple network interfaces.

For example, Antrea or Calico as the primary CNI, and a secondary interface such as macvlan.

Pre reqs:

  •  Bootstrap machine with the following installed: Tanzu CLI, kubectl installed as mentioned here
  •  Tanzu Kubernetes Grid management cluster and workload cluster running on vSphere, Amazon EC2, or Azure, with the package repository installed. For this demo, I have deployed TKG on Azure.


In TMC Console: Catalog > select the workload cluster (capv-workload in my case)  from drop down and click on multus-cni

  • Click on Install Package which can be found on top right side of the page

  • Name the Installed package as : capv-workload-multus and click NEXT

  • Package install resources: Leave to Default and click NEXT
  • Configure values: Leave to Default
  • Install Package

In TMC Console: Clusters > capv-workload > Add-ons > Installed > check if the package ( is succeeded and healthy

# Check the Daemonset and it should be running

kubectl get daemonset -n kube-system
antrea-agent 2 2 2 2 2 2d23h
kube-multus-ds-amd64 2 2 2 2 2 114s
kube-proxy 2 2 2 2 2 2d23h
  • connect to workload cluster node(s) and check for the file macvlan under directory /opt/cni/bin

  • Create a CRD specification. For example, create a file with name as multus-cni-crd.yaml that specifies a NetworkAttachmentDefinition named macvlan-conf, which configures a macvlan CNI:
apiVersion: ""
kind: NetworkAttachmentDefinition
name: macvlan-conf
config: '{
"cniVersion": "0.3.0",
"type": "macvlan",
"master": "eth0",
"mode": "bridge",
"ipam": {
"type": "host-local",
"subnet": "",
"rangeStart": "",
"rangeEnd": "",
"routes": [
{ "dst": "" }
"gateway": ""
Create CRD
# Get the admin credentials of the workload cluster into which you want to deploy Multus cni. In this case, capv-workload is workload cluster: 

$ tanzu cluster kubeconfig get capv-workload --admin

# Set the context of kubectl to the cluster

$ kubectl config use-context capv-workload-admin@capv-workload

# Create crd
kubectl create -f multus-cni-crd.yaml


  • Create test pod with config as below:
apiVersion: v1
kind: Pod
name: sample-pod
annotations: macvlan-conf
- name: sample-pod
command: ["tail"]
args: ["-f", "/dev/null"]
image: eknath009/netshoot
connect to pod
# Create pod

kubectl create -f my-multi-cni-pod.yaml

# Connect to pod

kubectl exec -it sample-pod -- ip addr
  • Once the pod is created, it will have three network interfaces (including loop back interface) as shown below. net1 is the new interface created via multus-cni.