github.com/Azure/aad-pod-identity@v1.8.17/tutorial/scripts/1-init-aks/4-configure-cli.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 "K8S 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  
    20  set -x
    21  
    22  az aks get-credentials --resource-group $RG --name $K8S_NAME
    23  
    24  set +x
    25  
    26  echo "kubectl is now configured. Run the following command to see your 1 node"
    27  echo "kubectl get nodes"