Delete User/Cluster or Context in Kubernetes

Delete a user

To delete a user, you can run the command:

$ kubectl --kubeconfig=<config_name> config unset users.<name>

Remove a cluster

To remove a cluster, you can run the command:

$ kubectl --kubeconfig=<config_name> config unset clusters.<name>
Property "clusters.<name>" unset

Remove a context

To remove a context, you can run the command:

$ kubectl --kubeconfig=<config_name> config unset contexts.<name>

Last updated