We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Top

We've already learned how to look at logs for k8s pods, but sometimes that's not enough when it comes to debugging. Sometimes we want to know about the resources that a pod is using.

To get metrics working, we need to enable the metrics-server addon. Run:

minikube addons enable metrics-server

Take a look inside the kube-system namespace:

kubectl -n kube-system get pod

You should see a new "metrics-server" pod. It might take a couple of minutes to get started, but once that pod is ready, you should be able to run:

kubectl top pod

You should see something like this:

NAME                               CPU(cores)   MEMORY(bytes)
synergychat-api-76b796b58d-x5wpk   1m           14Mi
synergychat-web-846d86c444-d9c8q   1m           15Mi
synergychat-web-846d86c444-sk6n4   1m           15Mi
synergychat-web-846d86c444-w2pqg   1m           15Mi

The kubectl top command (just like the unix top command) will show you the resources that each pod is using. In the example above, each pod is using about 1 milliCPU and 15 megabytes of memory.

Run:

kubectl proxy

Run and submit the CLI tests.