Which Kubernetes components do actually use monitoring data?

5/7/2021

I am running a Kubernetes cluster including metrics server add-on and Prometheus monitoring. I would like to know which Kubernetes components or activities use/can use monitoring data from the cluster.

What do I mean with "Kubernetes components or activities"?

Obviously, one of the main use cases for monitoring data are all autoscaling mechanisms, including Horizontal Pod Autoscaler, Vertical Pod Autoscaler and Cluster Autoscaler. I am searching for further components or activities, which use live monitoring data from a Kubernetes cluster, and potentially a short explanation why they use it (if it is not obvious). Also it would be interesting to know, which of those components or activities must work with monitoring data and which can work with monitoring data, i.e. can be configured to work with monitoring data.

What do I mean with "monitoring data"?

Monitoring data include, but are not limited to: Node metrics, Pod metrics, Container metrics, network metrics and custom/application-specific metrics (e.g. captured and exposed by third-party tools like Prometheus).

I am thankful for every answer or comment in advance!

-- shiggyyy
kubernetes
monitoring
prometheus

2 Answers

5/10/2021

I think you mentioned the most common components that uses the metrics inside kubernetes cluster. For any more detailed stuff I would suggest to have a look at the API server part called Kubernetes Auditing. It provides a security-relevant, chronological set of records documenting the sequence of actions in a cluster. The cluster audits the activities generated by users, by applications that use the Kubernetes API, and by the control plane itself.

You can monitor what happen, when did it happen and who initiated the request etc. This might get you some detailed info which other components might be using the metrics.

For more info, please have a look at: Kubernetes Audit Logging Introduction

-- acid_fuji
Source: StackOverflow

5/8/2021

metrics-server data is used by kubectl top and by the HorizontalPodAutoscaler system. I am not aware of any other places the use the metrics.k8s.io API (technically doesn't have to be served by metrics-server but usually is).

-- coderanger
Source: StackOverflow