Skip to content
KEP Brain

KEP-2371keps/sig-node/2371-cri-pod-container-stats

cAdvisor-less, CRI-full Container and Pod Stats

implementablebetasig-nodelatest v1.38
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

PRR approvers
@deads2kalpha@deads2kbeta
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
Loading decisions and status history

Keyboard shortcuts

Everywhere

?
Show or hide this list
/
Focus the question box on Ask, otherwise the page search
Ctrl Kor⌘ K
Focus the KEP search in the top bar
t
Switch the theme (system, light, dark)
Esc
Close a dialog, a search list or a menu

Go to a page

Press g, then the letter

g h
Home
g a
Ask
g e
Explore
g u
Audit
g m
Memory
g b
About

Ask

Enter
Send the question
Shift Enter
New line in the question
Esc
Cancel the running question

Search lists

KEP search and Explore search

↓or↑
Move through the results
HomeorEnd
First or last result (Explore)
Enter
Open the highlighted result, or KEP-n when the query is a number

KEP page

o
Open the KEP on GitHub
y
Open kep.yaml on GitHub
a
Ask about this KEP
←or→
Previous or next tab, when a tab is focused

Findings table

With a finding row focused (Tab into the table or click a row)

jork
Next or previous finding
EnterorSpace
Expand or collapse the finding
o
Open the finding's KEP page
d
Draft the fix as an issue text (nothing is posted)
]or[
Next or previous page of findings

Shortcuts pause while you type in a field. Press ? or Esc to close.