Created
February 13, 2019 08:31
-
-
Save amandadebler/bd1ba7e4a102dba2c2870c190364f7fe to your computer and use it in GitHub Desktop.
Reports the Docker runtime version for all nodes in all AKS clusters in all subscriptions in an Azure tenant
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
$mySubscriptions = $(az account list --query [].id -o tsv) | |
foreach ($subscription in $mySubscriptions) { | |
$clusters = $(az aks list --subscription $subscription) | ConvertFrom-Json | |
foreach ($cluster in $clusters) { | |
"$($cluster.name) in resource group $($cluster.resourceGroup) in subscription $subscription" | |
az aks get-credentials --resource-group $($cluster.resourceGroup) --name $($cluster.name) --subscription $subscription --overwrite-existing | |
kubectl get nodes -o custom-columns=NAME:.metadata.name,VERSION:.status.nodeInfo.containerRuntimeVersion | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment