kubelet has a subcomponent cAdvisor that is responsible for retrieving performace from pod and exposing them at kubelet API.
This API is utilized by metric server.
Commands to view metrics
kubectl top node
kubectl top pod
Commands to view logs
kubectl logs -f <pod-name>
kubectl logs -f <pod-name> -c <container-name>
# Return snapshot logs from pod nginx with only one containerkubectl logs nginx# Return snapshot logs from pod nginx with multi containerskubectl logs nginx --all-containers=true# Return snapshot logs from all containers in pods defined by label app=nginxkubectl logs -l app=nginx --all-containers=true# Return snapshot of previous terminated ruby container logs from pod web-1kubectl logs -p -c ruby web-1# Begin streaming the logs of the ruby container in pod web-1kubectl logs -f -c ruby web-1# Begin streaming the logs from all containers in pods defined by label app=nginxkubectl logs -f -l app=nginx --all-containers=true# Display only the most recent 20 lines of output in pod nginxkubectl logs --tail=20 nginx# Show all logs from pod nginx written in the last hourkubectl logs --since=1h nginx# Show logs from a kubelet with an expired serving certificatekubectl logs --insecure-skip-tls-verify-backend nginx# Return snapshot logs from first container of a job named hellokubectl logs job/hello# Return snapshot logs from container nginx-1 of a deployment named nginxkubectl logs deployment/nginx -c nginx-1