Skip to content

Instantly share code, notes, and snippets.

@carlessanagustin
Created December 12, 2019 15:26
Show Gist options
  • Save carlessanagustin/8347be78a4dce9f08b5b665cc05912e2 to your computer and use it in GitHub Desktop.
Save carlessanagustin/8347be78a4dce9f08b5b665cc05912e2 to your computer and use it in GitHub Desktop.
Setup Azure AKS environment with az cli
#!/usr/bin/env bash
: '
Usage:
Run next command
./aks_connect.sh <aks subscription> <aks resource group> <aks name>
OR change vars AKS_SUBS, AKS_RG & AKS_NAME and run
./aks_connect.sh
'
AKS_SUBS=XXX
AKS_RG=XXX
AKS_NAME=XXX
if [ $# != 0 ] ; then
AKS_SUBS=$1
AKS_RG=$2
AKS_NAME=$3
fi
az aks get-credentials --overwrite-existing \
--subscription $AKS_SUBS \
--resource-group $AKS_RG \
--name $AKS_NAME
kubectl get nodes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment