Christoph Raab

All about DevOps...

CheatSheet
cheatsheet/kubernetes/logging-monitoring

Logging and Monitoring

Welche Metriken sind verfügbar - Node Level Metrics - Pod Level Metrics

Wie kann man diese aggregieren - EFK - Prometheus

Metric-server <– oft verwendet

Performance Metrics

Metrics-Server bekommt Daten von kubelet über cAdvisor

Ermöglicht den kubectl top node / pod command

Kubernetes Metrics Deep Dive Series

Node Metrics Helper

alias k8snodeinfo='kubectl get nodes --no-headers | awk '\''{print $1}'\'' | xargs -I {} sh -c '\''echo {} ; kubectl describe node {} | grep Allocated -A 5 | grep -ve Event -ve Allocated -ve percent -ve -- ; echo '\'''

Usage:

k8snodeinfo

Output:

<node1>
  Resource                       Requests      Limits
  cpu                            2149m (55%)   2149m (55%)
  memory                         4031Mi (31%)  5442Mi (43%)

<node2>
  Resource                       Requests      Limits
  cpu                            1710m (44%)   1710m (44%)
  memory                         1982Mi (15%)  6266Mi (49%)

Logging

StdOut/Err gehen an docker logging driver

kubectl logs <pod> <container> 

args