Contents

Run Kubernetes on Windows


Contents

Recently Docker announced an experimental feature on their Windows App, that allows us to run Kubernetes on Windows Linux Subsystem. Here’s a high-level overview of how to do it:

  1. Install WSL2 by following the official installation guide.

    WSL 2 is a new version of the architecture in WSL that changes how Linux distributions interact with Windows

    If you are like me and try to use the Windows Store to install WSL, you end up with the first version of WSL installed. I had to join the Windows Insider Program, update my windows version, and follow the steps to Update from WSL 1 to WSL 2.

  2. Install Docker desktop for windows by following the official installation guide

  3. Enable the WSL2 based engine on the settings:

    docker desktop windows Linux subsystem settings

  4. Enable Kubernetes

    docker desktop Kubernetes settings

  5. Open the terminal on the Linux subsystem and install kubectl.

    1
    2
    3
    
    curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl \
    && chmod +x ./kubectl \
    && sudo mv ./kubectl /usr/local/bin/kubectl
    
  6. Get the configuration for the Kubernetes cluster from the Windows file system