How to make host interfaces, including cni* accessible in kubernetes privileged pods?

4/19/2017

We would like see traffic from other interfaces on the host, but noticed that they are not visible in the kubernetes pods. Is there an option that can be configured in the yaml file to make the interface(s) visible in the pods which are running in privileged mode.

-- Ajit Sarnaik
docker
flannel
kubernetes
networking

1 Answer

4/19/2017

If you put hostNetwork: true your Pod will see the host interfaces.

Technically you only need CAP_NET_ADMIN and CAP_NET_RAW to use promiscuous mode. See https://kubernetes.io/docs/concepts/policy/container-capabilities/ for details.

-- Janos Lenart
Source: StackOverflow