01 Jun 2023
az tips
- 创建一个启用multi-az的ip
az network public-ip create -n ssli-test-pip -g ssli-testing-rg --sku Standard --zone 1 2 3 --tier Regional --version IPv4 --allocation-method Static --idle-timeout 30
- 执行aks命令
az_aks_command() { CMD=$1; CMDOPTS=$2; az aks command invoke --resource-group ${RESOURCE_GROUP} --name ${AKS_NAME} --command "${CMD}" ${CMDOPTS}; }
az_aks_command "kubectl get no -o wide"
- 以特定tenant登录
az login -t TEST.onmicrosoft.com
- 切换到特定订阅
az account set --subscription id_or_name
- az创建resource group
az group create --name rg-dynatrace --location eastus
- az以sp登录
az login --service-principal -u $AZURE_CLIENT_ID -p $AZURE_SECRET --tenant $AZURE_TENANT
LEo
at 00:12