A network interface is a software or hardware connection through which a workload sends and receives network traffic. In Anthos on bare metal, Pods can use multiple interfaces when containerized network functions need to separate data-plane traffic from management or control-plane traffic, improve performance, or isolate network flows. section 8.3.2
The default Kubernetes interface appears as eth0. Additional Multus CNI interfaces appear as net1, net2, and later interfaces, and can use IPvlan, MacVLAN, Bridge, or SR-IOV. section 8.3.2
Configure additional Pod interfaces in three steps:
- Enable multi-NIC by setting multipleNetworkInterfaces to true in the clusterNetwork section of the Anthos bare metal cluster custom resource. section 8.3.2
- Define available networks with NetworkAttachmentDefinition custom resources, either during cluster creation or on an existing target cluster. section 8.3.2
- Assign networks to Pods or Deployments with the k8s.v1.cni.cncf.io/networks annotation. section 8.3.2
... clusterNetwork: multipleNetworkInterfaces: true pods: cidrBlocks: - 192.168.0.0/16 services: cidrBlocks: - 10.96.0.0/12 ...
Shows the cluster configuration field that enables multiple network interfaces for Pods. section 8.3.2
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: gke-network-1
spec:
config: ‘{
"type": "ipvlan",
"master": “ens224”,
“mode”: “l2”,
"ipam": {
"type": "whereabouts",
"range": "172.120.0.0/24"
}
}’
Shows a NetworkAttachmentDefinition using IPvlan, an L2 mode, a host interface, and Whereabouts IP address management. section 8.3.2
--- apiVersion: apps/v1 kind: Deployment metadata: name: sample-deployment spec: ... template: metadata: annotations: k8s.v1.cni.cncf.io/networks: default/gke-network-1, default/gke-network-2 labels: app: sample-deployment ...
Shows a Deployment assigning two additional networks through the Multus annotation. section 8.3.2


