Access to internal infrastructure from Kubernetes

7/16/2019

If I run Docker (Docker for Desktop, 2.0.0.3 on Windows 10), then access to internal infrastructure and containers is fine. I can easily do docker pull internal.registry:5005/container:latest But ones I enable Kubernetes there, I completely lose an access to internal infrastructure and [Errno 113] Host is unreachable in Kubernetes itself or connect: no route to host from Docker appears.

I have tried several ways, including switching of NAT from DockerNAT to Default Switch. That one doesn't work without restart and restart changes it back to DockerNAT, so, no luck here. This option also seems not to work.

-- Kirill Linnik
docker
docker-for-windows
kubernetes

1 Answer

7/30/2019

let's start from the basics form the official documentation:

  1. Please make sure you meet all the prerequisites and all other instructions were met.

  2. Also you can use this guide. It has more info with details pointing to what might have gone wrong in your case.

If the above won't help, there are few other things to consider:

  1. In case you are using a virtual machine, make sure that the IP you are referring to is the one of the docker-engines’ host and not the one on which the client is running.

  2. Try to add tmpnginx in docker-compose.

  3. Try to delete the pki directory in C:\programdata\DockerDesktop (first stop Docker, delete the dir and than start Docker). The directory will be recreated and k8s-app=kube-dns labels should work fine.

Please let me know if that helped.

-- OhHiMark
Source: StackOverflow