Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
AKS-Teardown
echo Enter the name of the environment you would like to delete
read envName
echo "Deleting Resource Group"
az group delete --name rg-$envName
echo "Deleting Service Principal"
az ad sp delete --id http://sp-kube-api-$envName
echo "Deleting Applications"
az ad app delete --id "$(az ad app list --query "[?displayName=='kube-aad-server-$envName'].{appId: appId}" -o tsv)"
az ad app delete --id "$(az ad app list --query "[?displayName=='kube-aad-client-$envName'].{appId: appId}" -o tsv)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment