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
No active XP Potion
Accept a Quest
Login to submit answers
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.
The Boot.dev CLI requires you to be signed in to submit your solution!
Copy/paste one of the following commands into your terminal:
Run
bootdev run 00800baa-5763-4ca3-bc25-78fceb4e919a
Submit
bootdev run 00800baa-5763-4ca3-bc25-78fceb4e919a -s
To run and submit the tests for this lesson, you must have an active Boot.dev membership
Using the Bootdev CLI
The Bootdev CLI is the only way to submit your solution for this type of lesson. We need to be able to run commands in your environment to verify your solution.
You can install it here. It's a Go program hosted on GitHub, so you'll need Go installed as well. Instructions are on the GitHub page.