Last active
October 20, 2022 22:22
-
-
Save matt-dres/72ac97e1efba0d87b261a1c93c0b2514 to your computer and use it in GitHub Desktop.
AKS TAP Login
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
#!/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