Setting Up WSL 2 for the Docker driver

Overview

This guide shows how to set up WSL 2 on Windows so you can run minikube with the Docker driver, and how to reach your workloads from a Windows browser.

There are two supported ways to provide Docker inside WSL 2:

  • Docker Engine inside your WSL distribution — install Docker directly in the Linux distribution where you run minikube.
  • Docker Desktop with WSL integration — install Docker Desktop for Windows and enable WSL integration for the distribution where you run minikube.

Steps

  1. Install WSL and confirm you are using WSL 2.

  2. Set up Docker using one of the two options above:

  3. From inside WSL, confirm Docker is working:

    docker version
    docker ps
    
  4. Start minikube with the Docker driver:

    minikube start --driver=docker
    

Accessing your services from Windows

With the Docker driver on Windows and WSL 2, the minikube node runs inside a container, so the node IP printed by minikube ip is not reachable directly from a Windows browser. Use one of the following instead:

  • NodePort services — run the command below and browse to the printed http://127.0.0.1:<port> address. Keep the terminal open while you use the URL:

    minikube service <service-name> --url
    
  • LoadBalancer services — run minikube tunnel in a separate terminal and keep it running, then reach the service on 127.0.0.1:

    minikube tunnel
    

For more ways to reach your applications, see the Accessing apps handbook page.

See also