aksdebug *nodename*
to be able to exec into an AKS node (unlocking Metricbeat, for example)aksnode *cluster* *resourcegroup*
to see nodepools' Kubernetes version-
aksnodeupg *cluster* *resourcegroup* *newkubeversion* *nodepoolname*
upgrade a nodepool to new Kubernetes versiongetevents *nodepoolname*
continuous flow of Kubernetes events related to a specific nodepoolwatch getnodepool *nodepoolname*
displays nodepool's hosts' state every 2 secondswatch podsnotrunning *nodepoolname*
displays not ready Pods on nodepool every 2 seconds
Created
January 30, 2024 22:39
-
-
Save ferdinandosimonetti/bf3f033ef27762b5f8adf1b0937d017a to your computer and use it in GitHub Desktop.
AKS-related scripts
This file contains hidden or 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 | |
kubectl debug node/$1 --image alpine:latest -it |
This file contains hidden or 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 | |
az aks nodepool list --cluster-name $1 -g $2 | jq -r '.[] | [.count,.orchestratorVersion,.name] |@tsv' |
This file contains hidden or 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 | |
az aks nodepool upgrade --cluster-name $1 -g $2 --kubernetes-version $3 -n $4 |
This file contains hidden or 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 | |
az aks upgrade -n $1 -g $2 --kubernetes-version $3 --control-plane-only |
This file contains hidden or 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 | |
kubectl get events -A -w |grep -v kube-system|grep aks-${1} |
This file contains hidden or 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 | |
kubectl get nodes -l agentpool=$1 |
This file contains hidden or 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 | |
kubectl get po -A -o wide|grep -v kube-system|grep aks-${1}|egrep -v 'Running|Completed' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment