IP addresses added using multus-cni are not reachable from another pod in same cluster

12/17/2019

I am using multus-cni to create multiple interfaces in my pod. I have weave-net CNI configured so pods come up with cluster ip 10.32.x.x. Using the below network-attachment-definition , I am able to bring up multiple interfaces inside a pod with IP addresses 10.32.0.180-199 but these IP addresses are unreachable from other pods in the same cluster. If I do kubectl exec into another pod, and ping 10.32.0.180, I am not able to ping that IP.

Can anyone tell me what needs to be done so that the additional interfaces in the pod are reachable within the cluster?

apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
  name: macvlan-conf
spec:
  config: '{
      "cniVersion": "0.3.0",
      "type": "macvlan",
      "master": "{{ .Values.global.interfaceName }}",
      "mode": "bridge",
      "ipam": {
        "type": "host-local",
        "subnet": "10.32.0.0/16",
        "rangeStart": "10.32.0.180",
        "rangeEnd": "10.32.0.199",
        "routes": [
          { "dst": "0.0.0.0/0" }
        ],
        "gateway": "10.32.0.1"
      }
    }'


kubectl version
Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.0", GitCommit:"ddf47ac13c1a9483ea035a79cd7c10005ff21a6d", GitTreeState:"clean", BuildDate:"2018-12-03T21:04:45Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.0", GitCommit:"ddf47ac13c1a9483ea035a79cd7c10005ff21a6d", GitTreeState:"clean", BuildDate:"2018-12-03T20:56:12Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"linux/amd64"}
-- santanu
cni
kubernetes
macvlan

0 Answers