Skip to content

Instantly share code, notes, and snippets.

@vfarcic
Last active January 18, 2022 00:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save vfarcic/c512488f6a30ca4783ce3e462d574a5f to your computer and use it in GitHub Desktop.
Save vfarcic/c512488f6a30ca4783ce3e462d574a5f to your computer and use it in GitHub Desktop.
# Source: https://gist.github.com/c512488f6a30ca4783ce3e462d574a5f
######################
# 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 group create \
--name chaos \
--location eastus
az aks create \
--resource-group chaos \
--name chaos \
--node-count 1 \
--node-vm-size Standard_D4s_v3 \
--generate-ssh-keys
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