Search code examples
kuberneteskubectlkubeconfig

Remove kubernetes cluster information from kubectx workflow


Is there a way to remove kubernetes cluster contexts from kubectx? Or can this only be done by manually removing them from kubeconfig?


Solution

  • There is a "delete" command for kubectx. You can see the kubectx help with kubectx --help

    For reference, the syntax is

    kubectx -d <NAME> [<NAME...>]
    

    eg, kubectx -d followed by one or more Kube context names.