Ingress in Kubernetes with Docker for Windows

katzekat profile image Heidi Harding ・2 min read

I am currently in the process of moving my dev systems from my 2017 Macbook Pro over to my new X1 Extreme gen. 2. On the Mac I had previously used minikube for my Kubernetes needs but I wanted to use the Docker for Windows Kubernetes option instead.

Enabling an Ingress controller was a fairly straight forward affair with minikube. Simply use:
minikube addons enable ingress
and there you go. kubectl get pods should then list your controller and it was automatically available from outside of your cluster.

I spent several hours trying to get an Ingress controller to work under Windows. Ultimately it was just as easy as minikube, however it really wasn't obvious. Therefore, I decided to pen this short article in case anyone else is experiencing the same problem.

In the documentation for the Nginx Ingress controller it states that you must run the mandatory command:
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/mandatory.yaml

If you perform this step on its own, you will end up with an empty Address when entering: kubectl describe ing because there is no service connecting the pod to the outside world.

There is no further information on this page for how to install a service for Windows, however if you follow the Docker for Mac instructions then it will work just fine. The following command made everything start up perfectly for me:
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/cloud-generic.yaml

I am running with Docker for Windows version stable using WSL.

I hope this helps someone :)


Editor guide
joebadmus profile image

Good work!!
The url 'raw.githubusercontent.com/kubernet...'.
Do you mind updating it?

ztickm profile image

Hello !
Thanks for pointing out that the url is dead.
Can you try this new one and see if it works?

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.41.2/deploy/static/provider/cloud/deploy.yaml