Skip to content

Instantly share code, notes, and snippets.

@matt-dres
Last active October 20, 2022 22:22
Show Gist options
  • Save matt-dres/72ac97e1efba0d87b261a1c93c0b2514 to your computer and use it in GitHub Desktop.
Save matt-dres/72ac97e1efba0d87b261a1c93c0b2514 to your computer and use it in GitHub Desktop.
AKS TAP Login
#!/bin/bash
set -eo pipefail
source "${HOME}"/.credentials
if [[ -z "$1" ]] || [[ -z "$2" ]]; then
echo "Missing input parameters for AKS resource group or name"
exit 1
fi
az login --username "${STD_USERNAME}" --password "${STD_PASSWORD}"
az account set --subscription "$1"
az aks get-credentials --resource-group "$2"-rg --name "$2"
kubectl config get-contexts
kubectl config current-context
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment