

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 3
click for more info
Not enough gems
Cost: 6 gems
1: Top
incomplete
2: Vertical and Horizontal Scaling
incomplete
3: Resource Limits
incomplete
4: Limits - RAM
incomplete
5: Breaking the Limits
incomplete
6: Fix the Limits
incomplete
7: Horizontal Pod Autoscaling (HPA)
incomplete
8: HPA - Web
incomplete
9: HPA Fix
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
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.