Change Kubernetes docker-for-desktop cluster network ip

12/3/2018

I am trying to configure Kubernetes on docker-for-desktops and I want to change the default network assigned to containers.

Example: the default network is 10.1.0.0/16 but I want 172.16.0.0/16.

I changed the docker network section to Subnet address: 172.16.0.0 and netmask 255.255.0.0 but the cluster keeps assigning the network 10.1.0.0/16. Network configuration

The problem I am facing here is that I am in a VPN which has the same network IP of kubernetes default network (10.1.0.0/16) so if I try to ping a host that is under the vpn, the container from which I am doing the ping keeps saying Destination Host Unreachable.

I am running Docker Desktop (under Windows Pro) Version 2.0.0.0-win81 (29211) Channel: stable Build: 4271b9e.

Kubernetes is provided from Docker desktop Kuberbetes

From the official documentation I know that

Kubernetes is available in Docker for Windows 18.02 CE Edge and higher, and 18.06 Stable and higher , this includes a standalone Kubernetes server and client, as well as Docker CLI integration. The Kubernetes server runs locally within your Docker instance, is not configurable, and is a single-node cluster

Said so, should Kubernetes use the underlying docker's configuration (like network, volumes etc.)?

-- Justin
docker
kubernetes
networking

0 Answers