Reputation: 109
I am trying to understand the difference between the metrics returned from the /metrics
endpoint on the API Server vs Kubelet.
Both seem to return similar metrics, however the apiserver has metrics for Etcd which are missing on Kubelet which makes sense.
However, I am not sure if the Kubelet /metrics
endpoint is actually pulling its info from the apiserver or if its the other way around? Or perhaps each maintains its own set of metrics?
Upvotes: 2
Views: 146
Reputation: 21
The /metrics
endpoint at kubelet is exposed by the kubelet itself. Kubelet collects the metrics information from the node it is running. Relevant information can be found in the k8s documentations(https://kubernetes.io/docs/concepts/cluster-administration/system-metrics/).
.
When calling the /metrics
called at api-server, it will collect information from all relevant components, including the /metrics
from kubelet, which can be shown in the Resource metrics pipeline(https://kubernetes.io/docs/tasks/debug/debug-cluster/resource-metrics-pipeline/#:~:text=The%20metrics%2Dserver%20calls%20the,metrics%2Fresource%20in%20version%20v0.).
.
Go back to your question, kubelet on each node expose /metrics
endpoint, the statistics from which are maintained by kubelet itself.
Upvotes: 1