Question 7 - Node and Pod Resource Usage
Question 7 | Node and Pod Resource Usage
The metrics-server has been installed in the cluster. Your college would like to know the kubectl commands to:
-
show Nodes resource usage
-
show Pods and their containers resource usage
Please write the commands into /opt/course/7/node.sh and /opt/course/7/pod.sh.
# Do a kubectl top -h to see possible commands
echo 'kubectl top nodes' > /opt/course/7/node.sh
sh /opt/course/7/node.sh
echo 'kubectl top pod --containers=true' > /opt/course/7/pod.sh
sh /opt/course/7/pod.sh