Skip to content

Instantly share code, notes, and snippets.

@vfarcic
Last active October 5, 2023 11:54
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save vfarcic/b068c3eadbc4140aed14b49141790940 to your computer and use it in GitHub Desktop.
Save vfarcic/b068c3eadbc4140aed14b49141790940 to your computer and use it in GitHub Desktop.
# Source: https://gist.github.com/b068c3eadbc4140aed14b49141790940
######################
# 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
az extension add --name aks-preview
az group create \
--name chaos \
--location eastus
az aks create \
--resource-group chaos \
--name chaos \
--node-count 3 \
--node-vm-size Standard_D4s_v3 \
--generate-ssh-keys \
--enable-cluster-autoscaler \
--min-count 1 \
--max-count 6
az aks get-credentials \
--resource-group chaos \
--name chaos
#################
# Install Istio #
#################
istioctl manifest install \
--skip-confirmation
export INGRESS_HOST=$(kubectl \
--namespace istio-system \
get service istio-ingressgateway \
--output jsonpath="{.status.loadBalancer.ingress[0].ip}")
echo $INGRESS_HOST
# Repeat the `export` command if the output of `echo` is empty
#######################
# Destroy the cluster #
#######################
az group delete --name chaos --yes
kubectl config delete-cluster chaos
kubectl config delete-context chaos
kubectl config unset \
users.clusterUser_chaos_chaos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment