MetricSpecV2 Properties
Class Properties 6 members
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.
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.
public ContainerResourceMetricSourceV2 ContainerResource { get; set; } Defines the configuration for an external metric source in the Kubernetes MetricSpecV2.
public ExternalMetricSourceV2 External { get; set; }Remarks
The
External property specifies an external metric to be used for scaling behavior in Kubernetes, where the metric originates from an outside monitoring system or component. It allows the definition of the metric name, associated selectors, and the desired target values for autoscaling. This provides flexibility in extending metric sources beyond standard Kubernetes resource and container metrics. 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.
public ObjectMetricSourceV2 Object { get; set; } 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.
public PodsMetricSourceV2 Pods { get; set; } 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.
public ResourceMetricSourceV2 Resource { get; set; } 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").
public string Type { get; set; }