Skip to content

Instantly share code, notes, and snippets.

@epcim
Last active February 19, 2020 16:11
Show Gist options
  • Save epcim/4dcb5ba64f00c3df86a83e156ee90b23 to your computer and use it in GitHub Desktop.
Save epcim/4dcb5ba64f00c3df86a83e156ee90b23 to your computer and use it in GitHub Desktop.
Azure az queries

Interesting Ops queris for Azure / AKS

Account, Subscription

az account list --query '[*].{Name:name}' --output table

Resource groups

List:

az group list --subscription "$(az account list --query '[*].{Name:name}' --output table|grep Prod)"
az group list --query '[*].{Name:name}' | jq -r '.[] | .Name' # |grep -v MC_

Disk

List disk sizes:

az disk list --query '[*].{Name:name,Gb:diskSizeGb,MbpsReadWrite:diskMbpsReadWrite,Sku:sku.name,Use:tags."kubernetes.io-created-for-pvc-name"}' --output table --resource-group MC_gc01-int-ves-io_gc-aks-k8s_westus2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment