Kubernetes Views 3

Installing Metrics Server on Kubernetes

Installing Metrics Server on Kubernetes image 1

To use the commands that show resource usage per node and pod on Kubernetes, you have to install Metrics Server.

kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml


After you run that command, run the following commands on every master and worker node.

echo "serverTLSBootstrap: true" >> /var/lib/kubelet/config.yaml
systemctl restart kubelet


Then check the CSRs

Installing Metrics Server on Kubernetes image 2

Approve every CSR that is for kubelet-serving.

kubectl certificate approve [csr]

You can inspect nodes and pods with the top command.

kubectl top nodes
kubectl top pods -A --sort-by memory
Installing Metrics Server on Kubernetes image 3
Installing Metrics Server on Kubernetes image 4

Reactions

Comments 0

A nickname and a password are required. The same password edits or deletes the comment later. Comments appear after a review.

Comments appear after a review. The password is used again to edit or delete.