Troubleshooting Minikube and Docker on Windows 11
Troubleshooting Minikube and Docker on Windows 11
Issue 1: Docker CLI Context "default" Not Found
Error Message:
Unable to resolve the current Docker CLI context "default": context "default": context not found: open C:\Users\\.docker\contexts\meta\*\meta.json: The system cannot find the path specified.
Solution:
- Start the Docker Service:
- Open the Services app.
- Find Docker Desktop Service and start it.
- Verify Docker is Running:
- Run
docker version
in a command prompt or PowerShell.
- Run
- Reinstall Docker if Necessary:
- Uninstall Docker Desktop from Settings> Apps.
- Delete the Docker folder in
C:\Users\
.\AppData\Local\Docker - Download and install the latest Docker Desktop from the Docker website.
Issue 2: Minikube with Hyper-V
Error Message:
Hyper-V requires Administrator privileges
Solution:
- Run PowerShell as Administrator:
- Right-click the Start button and select Windows Terminal (Admin) or PowerShell (Admin).
- Run
minikube start --driver=hyperv --hyperv-virtual-switch=minikube-switch
.
Error Message:
vswitch "minikube-switch" not found
Solution:
- Create a Virtual Switch:
- Open PowerShell as an Administrator.
- List network adapters with
Get-NetAdapter
. - Create a virtual switch:
New-VMSwitch -Name "minikube-switch" -NetAdapterName "YourAdapterName" -AllowManagementOS $true
- Verify the switch with
Get-VMSwitch
.
- Start Minikube:
- Run
minikube start --driver=hyperv --hyperv-virtual-switch=minikube-switch
.
- Run
Stopping and Restarting Minikube
Stop Minikube:
minikube stop
Restart Minikube:
minikube start