Metrics Server
You can have one Metrics Server per Kubernetes cluster.
The Metrics Server retrieves metrics from each of the Kubernetes nodes and pods, aggregates them, and stores them in memory.
Note that the Metrics Server is only an in-memory monitoring solution and does not store the metrics on the disk.
And as a result, you cannot see historical performance data. For that, you must rely on one of the advanced monitoring solutions(Prometheus, ELK, DataDog)
Monitoring Pods
The kubelet contains a sub component known as the cAdvisor or Container Advisor.
cAdvisor is responsible for retrieving performance metrics from pods and exposing them through the kubelet API to make the metrics available for the Metrics Server.
Installing Metrics Server
- This command deploys a set of pods, services, and roles to enable Metrics Server
- Once deployed, give the Metrics Server some time to collect and process data.
View metrics in nodes and pods
Checks Logs in a pod
View Docker Logs
View live docker logs in detach mode
s
View Pod Logs
If there are multiple containers within a pod,
you must specify the name of the container explicitly in the command.
Otherwise it would fail asking you to specify a name.