Search code examples
kubernetesintellij-ideagoogle-cloud-intellij

Where I can see "set context" for change kubernetes namespace in Intellij IDEA?


In official tutorial saying about changing namespace by cliking on namespace item and set context enter image description here

But I can't see in my version 2020.3

enter image description here


Solution

  • A namespace is a part of a Kubernetes context, other ones are cluster and user credentials. So essentially a Kubernetes context is a shortcut which gives you a quick access to a namespace in your cluster. For the screenshot you posted, default namespace has a context created for it (usual scenario), but other namespaces do not have a context.

    If you want to create a context for another namespace, please use kubectl config set-context command in a terminal. Cloud Code doesn't support this operation via UI or Kubernetes Explorer since it's normally rarely used. Contexts are normally created automatically when you start a cluster like minikube or GKE.