Getting AKS Cluster Health using Powershell

Hi , I am new to Powershell and we have a requirement to verify the health of Azure AKS Cluster , which includes Nodes are in Ready State or not , Pods are in running state or not and any other checks.
Could anyone help us how to verify all these checks using powershell. If there is any scrip available please provide.


Welcome to the forum.

We don’t provide scripts on request but would be happy to help you troubleshoot your own scripts and help you learn PowerShell.

What have you tried so far?

I’d start reading what you find when you search for the term you used as subject for this question.

Hi Olaf,

We generally use Kubectl commands like Kubectl get nodes, kubectl get pods -n etc to check the Nodes and Pods Details.

In order to get these details we need to connect to the cluster first using az aks get-credentials command and then we can access the cluster details right…

my only point is - is there any other way to get the details of the Cluster like - is cluster healthy or not , Nodes are in Ready state or not ? pods are in Running state or not using powershell…

If we have to automate this task , we can use az aks get-credentials command but after that, how can we execute kubectl commands from powershell . please clarify…