Monitoring¶
There are a number of open-source solutions available today, such as
Metrics server
Prometheus
Elastic stack
Proprietary solutions are:
DataDog
Dynatrace
Heapster vs Metrics Server¶
Heapster
is the one of the original projects that enabled monitoring and analysis feature for Kubernetes.
Remember
Heapster is now deprecated and a slimmed down version was formed known as the Metric Server.
You can have one metrics server per Kubernetes cluster. The metric server retrieves metrics from each of the Kubernetes nodes and PODs, aggregates them and stores them in memory.
You will see a lot of reference online when you look for reference architecture on monitoring Kubernetes.
Can I use metrics server for historical data?
Note that the metric server
is only an in-memory monitoring solution and doesnโt store the metrics on the disk and as a result you cannot see historical performance data.
Logging¶
# see logs for a pod
k logs <podname>
# see logs for a container
kubectl logs <podname> -c <container_name>
# tail the logs
k logs -f <podname>
Check out How log rotation is handled?