kubectl

Choosing the correct context

First check out your available contexts like this:

kubectl config get-contexts
CURRENT   NAME                                                 CLUSTER                                              AUTHINFO                                             NAMESPACE
*        do-toms-cluster                                      do-toms-cluster                                      do-toms-cluster-admin
          gke_symmetric-blade-21345                            gke_symmetric-blade-21345                            gke_symmetric-blade-21345

You can then choose the desired context like this:

kubectl config use-context do-toms-cluster

Merging Multiple Contexts

k3s

How to run kubeconfig

At first it’s best to run kubeconfig from the k3s server itself. Here’s a nice alias for it:

alias kubectl='sudo k3s kubectl'