MetricSpecV2 Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a metric specification used for horizontal scaling in Kubernetes. Supports various types of metrics for monitoring and scaling, such as container resource metrics, external metrics, pod metrics, object metrics, and resource metrics.
[YamlDotNet.Serialization.YamlSerializable]
public sealed class MetricSpecV2
[<YamlDotNet.Serialization.YamlSerializable>]
type MetricSpecV2 = class
Public NotInheritable Class MetricSpecV2
- Inheritance
-
MetricSpecV2
- Attributes
-
YamlDotNet.Serialization.YamlSerializableAttribute
Constructors
MetricSpecV2() |
Properties
ContainerResource |
Represents a container resource metric source for Kubernetes scaling. This property provides the configuration needed to scale workloads based on resource utilization metrics associated with a specific container within a pod. |
External |
Defines the configuration for an external metric source in the Kubernetes MetricSpecV2. |
Object |
Gets or sets the Object metric source. The Object metric source indicates a metric that is measured on a specific Kubernetes object (for example, hits-per-second on an Ingress object). The current value of the metric is obtained from the described Kubernetes object. |
Pods |
Represents a metric source targeted at Kubernetes Pods. Provides scalable metrics for workloads at the Pod level, enabling monitoring and adjustment based on specific scale conditions of pod metrics. |
Resource |
Represents a resource-based metric source used for autoscaling in Kubernetes environments. This property defines how the resource metrics should be retrieved and targeted for scaling purposes. |
Type |
Specifies the type of metric source used for scaling in Kubernetes. The value of this property determines the nature of the scaling metric and corresponds to one of the metric sources available in the MetricSpecV2 class (e.g., "ContainerResource", "Resource", "External", "Pods", or "Object"). |