From 118465fa826e0857fb7ea6b5e14a8c4e2803aec3 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Thu, 21 Apr 2022 10:06:35 +0200 Subject: [PATCH] Added azure cli notes to the knowledge base --- knowledge base/az.md | 50 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 knowledge base/az.md diff --git a/knowledge base/az.md b/knowledge base/az.md new file mode 100644 index 0000000..ed925a9 --- /dev/null +++ b/knowledge base/az.md @@ -0,0 +1,50 @@ +# Azure CLI + +## TL;DR + +```shell +# login +az login + +# check a user's permissions +az ad user get-member-groups --id user@email.org + +# list available subscriptions +az account list --refresh --output table + +# set a default subscription +az account set --subscription subscription-uuid + +# set a default resource group +az configure --defaults group=resource-group + +# get credentials for an aks cluster +az aks get-credentials --resource-group resource-group --name cluster-name --overwrite-existing + +# diagnose container registry connectivity issues +# will run a hello-world image locally +az acr check-health --name acr-name + +# list helm charts in an acr +az acr helm list -n acr-name -s acr-subscription + +# push a helm chart to an acr +az acr helm push -n acr-name chart.tgz --force + +# disable connection verification +# for proxies with doubtful certificates +export AZURE_CLI_DISABLE_CONNECTION_VERIFICATION=1 +``` + +## Further readings + +- [Install Azure CLI on macOS] +- [Get started with Azure CLI] +- [Sign in with Azure CLI] +- [How to manage Azure subscriptions with the Azure CLI] + + +[Get started with Azure CLI]: https://docs.microsoft.com/en-us/cli/azure/get-started-with-azure-cli +[How to manage Azure subscriptions with the Azure CLI]: https://docs.microsoft.com/en-us/cli/azure/manage-azure-subscriptions-azure-cli +[Install Azure CLI on macOS]: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-macos +[Sign in with Azure CLI]: https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli