Kubernetes fails to start when Docker Desktop starts, requires restart

Many of us enabled WSL2 integration and install Ubuntu from MS Store after installing Docker Desktop (at least >= 4.7.1) and starting Kubernetes, and found Kubernetes failed to start and stuck, for me the cause was due to the ‘Ubuntu’ in MS Store defaults to Distro 22.04.X which I believe is not working well with Docker Desktop and its Kubernetes engine.

The solution:

run Windows Task Manager to end-task Docker Desktop
uninstall ‘Ubuntu’ which is version 22.04.X in Windows installed apps
run ‘wsl -l -v’ to look at existing status
run ‘wsl -t Ubuntu-22.04’ to terminate Distro ‘Ubuntu-22.04’
run ‘wsl --unregister Ubuntu-22.04’ to unregister it
from MS Store download and install Ubuntu-20.04
run wsl and initialize Ubuntu-20.04
run ‘wsl -s Ubuntu-20.04’ to set default to it
in Docker Desktop Settings/Resources/WSL integration enable it and set it to default WSL distro ‘Ubuntu-20.04’

Kubernetes will start fine and fast.

2 Likes