Cluster CPU & Memory Inspections
Quickly get the summary of total CPU
$ kubectl get nodes -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.capacity.cpu}{"\n"}{end}' | awk '{sum += $2} END {print "Total CPUs across all nodes: " sum}'Quickly get the summary of total Memory
$ kubectl get nodes -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.capacity.memory}{"\n"}{end}' | awk '{print $1 "\t" $2 / (1024 * 1024) " MB"}'Inspect Current Utilization
$ kubectl top nodes$ kubectl top nodes | awk '{print $1, $2, $3, $4, ($5/1024/1024)"MB", $6}'Using Kubernetes Dashboard

Last updated