Docker/kubernetes proxy config

9/20/2018

I am running into a peculiar problem. I have kubernetes cluster, I setup no_proxy for the master node of the cluster (in docker systemd environment). In order to be able to run docker build/push to a registry that is running on docker on the master node.

Now I have a problem, as my containers cannot access the outside network (because the communication happens through k8s master node I presume).

Or if I choose not to set no_proxy for the master node in docker then I cannot push images to my registry through the external IP of the master, have to use (localhost) as push destination -> which breaks my app later on.

I use weave as my cni plugin

-- mAm
docker
kubernetes

1 Answer

9/20/2018

The network communication of containers running on your nodes has nothing to do with the network communication of your master to the outside world or it through a proxy.

Basically, the network communication for your containers running on a node goes through its own network interface, etc.

Having said that, are you running your workloads on your master? If yes, that could be affecting the communication of your master containers (if you set no_proxy for some hostnames). It could also be affecting the communication of your kube-controller-manager, kube-apiserver, core-dns, kubelet and network overlay on the master.

Are you configuring your docker client proxy correctly as per here?

-- Rico
Source: StackOverflow