Monitor & logs
Last modified by Bin Chen on 2020/09/04 04:05
1.1 Builtin
View events
kubectl get events
View logs
kubectl logs my-custom-sheduler –-name-space=kube-system
kubectl logs <pod name> <container name>
1.2 Metrics Server
One Metrics server is for one K8s cluster. The metrics server retrieves metrics from each of the kubernetes nodes and pods, aggregates them and stores them in memory.
Note that the metric server is only an in memory monitoring solution and does not store the metrics on the desk and as a result you cannot see historical performance data.
1.2.1 Deploy
1.2.2 Use
List the top nodes in term of resource consumption.
kubectl top node
List the top pods in term of resource consumption.
kubectl top pod