Search code examples
kubernetesminikubedocker-desktop

How to completely remove Kubernetes after disabling it from Docker Desktop?


I can still access kubectl after disabling Kubernetes from Docker Desktop v4.18.0

Disabled Kubernetes service in Docker Desktop

On running the kubectl version command, following output is displayed:

kubectl version command in terminal

Environment details: 
     - OS: MacOS Ventura 13.3.1 (M1)
     - Docker Desktop: v4.18.0

I want to entirely remove kubectl and related services, so that I can do a fresh install of minikube for local development. Please suggest required steps for the same.


Solution

  • As per official doc:

    After disabling Kubernetes Select Apply & Restart to save the settings.This stops and removes Kubernetes containers, and also removes the /usr/local/bin/kubectl command.

    Below troubleshooting steps can help you:

    • If you don't have kubectl installed in /usr/local/bin, Docker will install it for you on startup, so check where the kubectl is located then remove the kubectl binary.

    • Check if kubernetes is still in the starting state.

    • Check if any existing repositories are there using brew search kubectl.

    • Try clean / purge data or reset to factory defaults in the troubleshooting menu.

    Also as @David Maze suggested you can install minikube using brew install minikube without removing kubectl.