Docker Community Forums

Share and learn in the Docker community.

Docker for Mac Kubernetes Unauthorized error

(Midiparse) #1

I am unable to use the Kubernetes support of Docker for Mac.
Although I am in the right context

$ kubectl config get-contexts
CURRENT   NAME                       CLUSTER                      AUTHINFO             NAMESPACE
*         docker-for-desktop         docker-for-desktop-cluster   docker-for-desktop

when running a command like

kubectl get pods

I get an Unauthorized error:

$ kubectl get pods
error: You must be logged in to the server (Unauthorized)