How do I delete clusters and contexts from kubectl config?

前端 未结 4 1096
生来不讨喜
生来不讨喜 2021-01-30 00:49

kubectl config view shows contexts and clusters corresponding to clusters that I have deleted.

How can I remove those entries?

The command



        
4条回答
  •  星月不相逢
    2021-01-30 01:02

    Unrelated to question, but maybe a useful resource.

    Have a look at kubectx + kubens: Power tools for kubectl.

    They make it easy to switch contexts and namespace + have the option to delete

    e.g.,

    kubectx -d my-context
    

提交回复
热议问题