2

Just getting started on Docker and after installing Docker Desktop on a Windows 10 Pro machine, the option to enable Kubernetes is missing from the context menu when using Windows containers. See the attached image. When I switch to Linux containers the option appears. Various reading I've done seems to indicate that it should be available to Windows containers too. What am I missing?

Windows 10 Pro (10.0.17134.1006)

Docker Desktop 2.1.0.5

enter image description here

After update:

enter image description here

Settings after update:

enter image description here

4 Answers 4

4

You need to first switch to Edge version by going to the

Docker -> Settings -> General tab.

Then, you have to enable the kubernetes.

Open Docker for Windows settings by accessing your system tray and navigate to the Kubernetes tab. Select the checkbox for Enable Kubernetes to start a single-node cluster when starting Docker.

Reference: https://medium.com/@damiannolan/kubernetes-on-docker-for-windows-5ca0c6395668

As per this old link and a latest one, Kubernetes needs a Linux master node and thus the kubernetes cluster can be initialized only from linux containers in Docker desktop for Windows. After enabling and starting the docker containers, you can add Windows containers the the running kubernetes cluster.

This will give you much clear context.

6
  • 1
    Could you mark the answer as accepted if it solved the issue?
    – 030
    Commented Dec 20, 2019 at 14:25
  • Thanks for the quick reply, however after I updated to 2.1.7.0 edge, the option still doesn't appear with Windows containers.
    – ACB
    Commented Dec 20, 2019 at 16:53
  • What all options you see when you click on settings
    – Samit
    Commented Dec 20, 2019 at 16:55
  • Left side tabs: General, Resources, Docker Engine, Command Line
    – ACB
    Commented Dec 20, 2019 at 16:57
  • 1
    unfortunately, kubernetes cannot be enabled from Windows containers option as the kubernetes control plane must be running on Linux container. I've updated the answer with more details.
    – Samit
    Commented Dec 20, 2019 at 18:00
1

As Samit commented, the options for Kubernetes are only available if Linux containers are currently set as the environment.

0

My problem was that I had installed some version or configuration of docker that I got from a Udemy course. There was no Kubernetes anywhere. Once I removed that version of docker and installed a new one downloaded from https://docs.docker.com/get-docker/ , the k8s option was there.

1
  • The similar issue has happend to me. I didn't see K8s menu item in General settings. Once I've ununstall and downloaded from official site I was starting to see it.
    – Eugene
    Commented Oct 28, 2023 at 18:54
0

I faced the similar issues with Docker Windows. I realized we need to switch to linux by clicking on windows tray right click docker as below:

Switch to Linux Conatinersur.com/C0e4r.png

Please note, if your previous images are on windows you need to run the same process after switching to linux and then continue with your Kubernetes kubectl

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.