Last active
January 18, 2022 00:33
-
-
Save vfarcic/c7c9a8603c560eaf88d28db16b14768c 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
# Source: https://gist.github.com/c7c9a8603c560eaf88d28db16b14768c | |
###################### | |
# Create The Cluster # | |
###################### | |
az login | |
az provider register -n Microsoft.Network | |
az provider register -n Microsoft.Storage | |
az provider register -n Microsoft.Compute | |
az provider register -n Microsoft.ContainerService | |
export CLUSTER_NAME=chaos | |
az group create \ | |
--name $CLUSTER_NAME \ | |
--location eastus | |
az aks create \ | |
--resource-group $CLUSTER_NAME \ | |
--name $CLUSTER_NAME \ | |
--node-count 1 \ | |
--node-vm-size Standard_D4s_v3 \ | |
--generate-ssh-keys | |
az aks get-credentials \ | |
--resource-group $CLUSTER_NAME \ | |
--name $CLUSTER_NAME | |
####################### | |
# Destroy the cluster # | |
####################### | |
az group delete \ | |
--name $CLUSTER_NAME \ | |
--yes | |
kubectl config delete-cluster $CLUSTER_NAME | |
kubectl config delete-context $CLUSTER_NAME | |
kubectl config unset \ | |
users.clusterUser_$CLUSTER_NAME_$CLUSTER_NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment