Skip to content

Instantly share code, notes, and snippets.

@dhoeric
Created September 8, 2016 03:11
Show Gist options
  • Save dhoeric/f70e56583d3a462794ad0e646a9032d0 to your computer and use it in GitHub Desktop.
Save dhoeric/f70e56583d3a462794ad0e646a9032d0 to your computer and use it in GitHub Desktop.
#!/bin/bash -e
# To unset cluster config in ~/.kube/config
if [ -z "$1" ]
then
echo "Usage: unset-kube-cluster.sh [cluster-name]"
exit
fi
cluster_name=$1
kubectl config unset clusters.$cluster_name
kubectl config unset contexts.$cluster_name
kubectl config unset users.$cluster_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment