Node status and consumption

Run the following command to get information about the nodes on the cluster:

kubectl get nodes

The following lists their name, status, and age:

NAME                       STATUS    ROLES     AGE       VERSION
aks-agentpool-26533852-0 Ready agent 34d v1.11.5

You can get more information by passing the -o wide option:

kubectl get -o wide nodes

The output lists, the underlying OS-IMAGE, internal IP, and other useful information can be obtained with the following:

NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
aks-agentpool-26533852-0 Ready agent 34d v1.11.5 10.240.0.4 <none> Ubuntu 16.04.5 LTS 4.15.0-1036-azure docker://3.0.1

You can find out which nodes are consuming the most resources, using the following:

kubectl top nodes

It shows the CPU and memory usage of the nodes:

NAME                       CPU(cores)   CPU%      MEMORY(bytes)   MEMORY%
aks-agentpool-26533852-0 146m 7% 1233Mi 23%

The same set of commands can be run for pods.