You are viewing documentation for Kubernetes version: v1.30

Kubernetes v1.30 documentation is no longer actively maintained. The version you are currently viewing is a static snapshot. For up-to-date information, see the latest version.

Kubernetes Custom Metrics (v1beta2)

Package v1beta2 is the v1beta2 version of the custom_metrics API.

Resource Types

MetricListOptions

MetricListOptions is used to select metrics by their label selectors

FieldDescription
apiVersion
string
custom.metrics.k8s.io/v1beta2
kind
string
MetricListOptions
labelSelector
string

A selector to restrict the list of returned objects by their labels. Defaults to everything.

metricLabelSelector
string

A selector to restrict the list of returned metrics by their labels

MetricValue

Appears in:

MetricValue is the metric value for some object

FieldDescription
apiVersion
string
custom.metrics.k8s.io/v1beta2
kind
string
MetricValue
describedObject [Required]
core/v1.ObjectReference

a reference to the described object

metric [Required]
MetricIdentifier
No description provided.
timestamp [Required]
meta/v1.Time

indicates the time at which the metrics were produced

windowSeconds [Required]
int64

indicates the window ([Timestamp-Window, Timestamp]) from which these metrics were calculated, when returning rate metrics calculated from cumulative metrics (or zero for non-calculated instantaneous metrics).

value [Required]
k8s.io/apimachinery/pkg/api/resource.Quantity

the value of the metric for this

MetricValueList

MetricValueList is a list of values for a given metric for some set of objects

FieldDescription
apiVersion
string
custom.metrics.k8s.io/v1beta2
kind
string
MetricValueList
metadata [Required]
meta/v1.ListMeta
No description provided.
items [Required]
[]MetricValue

the value of the metric across the described objects

MetricIdentifier

Appears in:

MetricIdentifier identifies a metric by name and, optionally, selector

FieldDescription
name [Required]
string

name is the name of the given metric

selector
meta/v1.LabelSelector

selector represents the label selector that could be used to select this metric, and will generally just be the selector passed in to the query used to fetch this metric. When left blank, only the metric's Name will be used to gather metrics.

This page is automatically generated.

If you plan to report an issue with this page, mention that the page is auto-generated in your issue description. The fix may need to happen elsewhere in the Kubernetes project.

Last modified May 18, 2023 at 9:35 PM PST: Add config APIs metrics API (bc4758e3b2)