Kubectl By Example

How do I connect to a cluster?

kubectl config use-context <CLUSTER NAME>

This will configure kubectl to use the cluster with the name you specify.

>kubectl config use-context docker-desktop
Switched to context "docker-desktop".