- Take me to Practice Test
Solutions to practice test - monitor cluster components
-
We have deployed a few PODs running workloads. Inspect it.
kubectl get pods
-
Let us deploy metrics-server to monitor the PODs and Nodes. Pull the git repository for the deployment files.
git clone https://github.com/kodekloudhub/kubernetes-metrics-server.git
-
Deploy the metrics-server by creating all the components downloaded.
Run the 'kubectl create -f .' command from within the downloaded repository.
cd kubernetes-metrics-server kubectl create -f .
-
It takes a few minutes for the metrics server to start gathering data.
Run the
kubectl top node
command and wait for a valid output.kubectl top node
-
Identify the node that consumes the most CPU(cores).
Run the
kubectl top node
commandkubectl top node
Examine the
CPU(cores)
column of the output to get the answer. -
Identify the node that consumes the most Memory(bytes).
Run the `kubectl top node` command$ kubectl top node
Examine the
MEMORY(bytes)
column of the output to get the answer. -
Identify the POD that consumes the most Memory(bytes).
Run the
kubectl top pod
commandkubectl top pod
Examine the
MEMORY(bytes)
column of the output to get the answer. -
Identify the POD that consumes the least CPU(cores).
Run the
kubectl top pod
commandkubectl top pod
Examine the
CPU(cores)
column of the output to get the answer.