Home > Software engineering >  Changing the default k9s/Kubernetes context
Changing the default k9s/Kubernetes context

Time:05-20

I have 3 contexts set up in k9s (context1, context2, context3). I know I can change the context within k9s by typing :context but how do I change the default context that loads when I open k9s from context3 to context1?

CodePudding user response:

You can set the default context via kubectl:

kubectl config use-context context1

This will update the default context in your KUBECONFIG, what is the base for k9s.

  • Related