KEP-2371keps/sig-node/2371-cri-pod-container-stats
cAdvisor-less, CRI-full Container and Pod Stats
There are two main APIs that consumers use to gather stats about running containers and pods: [summary API][summary-api] and [/metrics/cadvisor][metrics-cadvisor]. The Kubelet is responsible for implementing the summary API, and cadvisor is responsible for fulfilling /metrics/cadvisor. The CRI API currently does not provide enough metrics to fully supply al… Full summary
There are two main APIs that consumers use to gather stats about running containers and pods: [summary API][summary-api] and [/metrics/cadvisor][metrics-cadvisor]. The Kubelet is responsible for implementing the summary API, and cadvisor is responsible for fulfilling /metrics/cadvisor. The CRI API currently does not provide enough metrics to fully supply all the fields for either endpoint, however is used to fill some fields of the summary API. This results in an unclear origin of metrics, duplication of work done between cAdvisor and CRI, and performance implications. This KEP aims to enhance CRI implementations to be able to fulfill all the stats needs of Kubernetes. At a high level, there are two pieces of this: - enhance the CRI API with enough metrics to be able to supplement the pod and container fields in the summary API directly from CRI. - enhance the CRI implementations to broadcast the required metrics to fulfill the pod and container fields in the /metrics/cadvisor endpoint. [summary-api]: https://github.com/kubernetes/kubernetes/blob/release-1.20/staging/src/k8s.io/kubelet/pkg/apis/stats/v1alpha1/types.go [metrics-cadvisor]: https://github.com/google/cadvisor/blob/master/docs/storage/prometheus.md#prometheus-container-metrics
Facts
- Authors
- @haircommander@bobbypage
- Approvers
- @dchen1107@haircommander
- Tracking issue
- #2371(opens GitHub in a new tab) openmilestone v1.38sig/nodesig/windowsstage/betatracked/yeslead-opted-in
- Milestones
- alpha v1.29beta v1.37
- Participating SIGs
- none
- Feature gates
- PodAndContainerStatsFromCRI
- Created / last updated
- 2021-01-27 / none