Files
dotfiles/home/.bin/kind-delete-cluster
Marcus Noble a8f0d8d043 Fixed kind
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2025-02-07 13:47:10 +00:00

23 lines
531 B
Bash
Executable File

#!/usr/bin/env bash
source .utils
CONTEXT_NAME=$(kubectl config current-context | sed -e "s/kind-//")
print_usage() {
orange "kind-delete-cluster - delete a Kind cluster"
echo " "
underline "Usage:"
echo "kind-delete-cluster [cluster-name]"
echo " "
echo "If no cluster-name is provided it will attempt to get it from the current kubectl context"
echo " "
underline "Options:"
echo "-h, --help show this help text"
}
# Positional args
NAME=${1:-${CONTEXT_NAME}}
kind delete cluster --name ${NAME}