Provides an API for metrics collected by kubelet
/cadvisor
Required for kubectl top
and Horizontal/Vertical Pod AutoScaler
View table of all nodes:
kubectl top node
View table of all pods in the current namespace:
kubectl top pod
Provides an API for metrics collected by kubelet
/cadvisor
Required for kubectl top
and Horizontal/Vertical Pod AutoScaler
Get node state:
kubectl get --raw /apis/metrics.k8s.io/v1beta1/nodes/kind-worker \
| jq
Get pod state:
NS=kube-system
POD=etcd-kind-control-plane
kubectl get --raw \
"/apis/metrics.k8s.io/v1beta1/namespaces/${NS}/pods/${POD}" \
| jq