Is it ok to disable docker0 bridge in k8s cluster?

5/22/2019

The default subnet of docker0 is 172.17.x.x/16, it's overlapped with some of the network devices. After doing some search, I found that docker0 can be disabled in /etc/docker/daemon.js, like

{ "bridge": "none"}

None of the containers in my k8s cluster is using docker0 network, I did some test after disabling docker0, everything seems to be working fine, but I wonder if this configuration is normal for a k8s cluster, and if there is any potential risks I overlooked.

-- Jin Mengfei
docker
kubernetes

1 Answer

6/17/2019

Answering on behalf of @Barath

k8s uses custom bridge which is different from docker`s default bridge based on network type to satisfy kubernetes networking model. So this should be fine. In case you want to modify docker bridge CIDR block you can specify this --bip=CIDR as part of DOCKER_OPTS which is different from cbr0-CIDR. – Barath May 22 at 5:06

and @menya

It depends on which kubernetes networking model you use, but I have never seen networking model using docker's bridge. So it is fine. – menya May 22 at 8:09

Because no further response was given and we should keep answers away from comments section.

-- OhHiMark
Source: StackOverflow