Created
September 20, 2024 04:52
-
-
Save lvnilesh/ba6a92c78205334cb0cebc3d0d30f4fb to your computer and use it in GitHub Desktop.
create-aks-k8s.sh
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
``` | |
export RANDOM_ID="$(openssl rand -hex 3)" | |
export MY_RESOURCE_GROUP_NAME="CGRG$RANDOM_ID" | |
export REGION="westus" | |
export MY_AKS_CLUSTER_NAME="andromeda$RANDOM_ID" | |
export MY_DNS_LABEL="cgdns$RANDOM_ID" | |
az group create --name $MY_RESOURCE_GROUP_NAME --location $REGION | |
az aks create --resource-group $MY_RESOURCE_GROUP_NAME --name $MY_AKS_CLUSTER_NAME --node-count 1 --generate-ssh-keys | |
az aks get-credentials --resource-group $MY_RESOURCE_GROUP_NAME --name $MY_AKS_CLUSTER_NAME | |
kubectl get nodes | |
# az group list --query "[?location=='westus']".name -o tsv | xargs -ot -n 1 az group delete -y --no-wait -n | |
az group list | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment