Does kubernetes use netns?

4/5/2018

In some articles I read that k8s use netns to isolate pods networking. But I can't list them on my k8s hosts.

ip netns list

returns nothing.

I use kubernetes v1.8.

Also there is installed Weave Net addon.

-- Silk0vsky
kubernetes
networking

1 Answer

4/8/2018

I guess you are looking at an "empty" system, i.e no pods started?

Then only the kubernetes pods are running and they most likely executes in main netns.

Try to start some pods and check again. I get;

# ip netns
k8s_27f642f4-3b10-11e8-b690-000000010001 (id: 0)

with one pod running on the node.

-- lgekman
Source: StackOverflow