Search code examples
dockerkubernetesgoogle-kubernetes-enginekubectlminikube

Which kubectl should I use on macOS?


On macOS there's Docker Desktop which comes with a kubectl, there's the Homebrew kubectl, then there's the gcloud kubectl.

I'm looking to use Minikube for local Kubernetes development and also GKE for production.

Which kubectl should I use? I'm thoroughly confused by all the various versions and how they differ from one another. Does it matter at all other than the version of the binary?


Solution

  • It doesn't really matter from where you get an executable as long as it is a trusted source. Although you have to use a supported version (documentation):

    kubectl is supported within one minor version (older or newer) of kube-apiserver.

    Example:

    kube-apiserver is at 1.20 kubectl is supported at 1.21, 1.20, and 1.19