Created
February 28, 2023 17:05
-
-
Save juan-lee/5004d743bdd835ee2d3ff8c0dad1f9a3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# optional argument handling | |
if [[ "$1" == "version" ]] | |
then | |
echo "1.0.0" | |
exit 0 | |
fi | |
if [ -z "$1" ]; then | |
echo "Please specify node name" | |
exit 1 | |
fi | |
node="$1" | |
node_id=$(kubectl get no "${node}" -o json | jq -r '.spec.providerID' | cut -c 9-) | |
az vmss delete --ids "${node_id}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment