Skip to content

Instantly share code, notes, and snippets.

@kesor
Last active October 1, 2020 07:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kesor/fbb915196792d179120152466c443962 to your computer and use it in GitHub Desktop.
Save kesor/fbb915196792d179120152466c443962 to your computer and use it in GitHub Desktop.
function get_cluster_name() {
if ! kubectl config current-context ; then
echo "ERROR: Could not read kubeconfig context" 2>&1
exit 1
fi
}
CLUSTER_NAME=$(get_cluster_name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment