Merge pull request #101308 from pacoxu/doc-kubelet-running-pods

kubelet_running_pods shows number of pods that have a running pod sandbox
This commit is contained in:
Kubernetes Prow Robot 2021-05-26 03:17:20 -07:00 committed by GitHub
commit 91656fa6eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -412,12 +412,13 @@ var (
[]string{"runtime_handler"}, []string{"runtime_handler"},
) )
// RunningPodCount is a gauge that tracks the number of Pods currently running // RunningPodCount is a gauge that tracks the number of Pods currently with a running sandbox
// It is used to expose the kubelet internal state: how many pods have running containers in the container runtime, and mainly for debugging purpose.
RunningPodCount = metrics.NewGauge( RunningPodCount = metrics.NewGauge(
&metrics.GaugeOpts{ &metrics.GaugeOpts{
Subsystem: KubeletSubsystem, Subsystem: KubeletSubsystem,
Name: RunningPodsKey, Name: RunningPodsKey,
Help: "Number of pods currently running", Help: "Number of pods that have a running pod sandbox",
StabilityLevel: metrics.ALPHA, StabilityLevel: metrics.ALPHA,
}, },
) )

View File

@ -702,7 +702,7 @@ kubelet_running_containers{container_state="unknown"} 2
name: "test pod count", name: "test pod count",
metricsName: "kubelet_running_pods", metricsName: "kubelet_running_pods",
wants: ` wants: `
# HELP kubelet_running_pods [ALPHA] Number of pods currently running # HELP kubelet_running_pods [ALPHA] Number of pods that have a running pod sandbox
# TYPE kubelet_running_pods gauge # TYPE kubelet_running_pods gauge
kubelet_running_pods 2 kubelet_running_pods 2
`, `,