github.com/Azure/aad-pod-identity@v1.8.17/tutorial/scripts/1-init-aks/3-create-aks.sh (about)

     1  #!/bin/bash
     2  
     3  set -e
     4  
     5  if [ -z "$RG" ]
     6  then
     7        echo "Resource Group Name Not Set. Set the env variable with the following command:"
     8        echo "export RG=\"rg-name\" "
     9        return 1
    10  fi
    11  
    12  if [ -z "$K8S_NAME" ]
    13  then
    14        echo "Kubernetes Cluster Name Not Set. Set the env variable with the following command:"
    15        echo "export K8S_NAME=\"K8S_NAME\" "
    16        return 1
    17  fi
    18  
    19  echo "Creating AKS cluster named $K8S_NAME with 1 node. This may take a while..."
    20  set -x
    21  
    22  az aks create --resource-group $RG --name $K8S_NAME --node-count 1 --generate-ssh-keys