HorizontalPodAutoscalerSpecV2 Properties
Class Properties 5 members
Represents the specification for a Horizontal Pod Autoscaler (HPA) in version v2 of the Kubernetes Autoscaling API. Provides configuration settings for scaling behavior, target resource, metrics, and replica limits.
Specifies the scaling behavior configuration for a Horizontal Pod Autoscaler.
public HorizontalPodAutoscalerBehaviorV2 Behavior { get; set; }Remarks
This property defines how the Horizontal Pod Autoscaler should behave during scaling operations. It includes rules and policies for scaling up and scaling down, such as stabilization windows and scaling limits.
Specifies the maximum number of replicas that a resource, such as a set of pods, can scale up to using the Horizontal Pod Autoscaler (HPA).
public int MaxReplicas { get; set; }Remarks
The MaxReplicas property defines an upper limit to prevent the workload from growing beyond a certain size, ensuring that resource utilization remains controlled. This is a required property and must be greater than or equal to 1.
Gets the list of metrics that determine the desired replica count for the target resource.
public List<MetricSpecV2> Metrics { get; }Remarks
The metrics define how the scaling behavior of the HorizontalPodAutoscaler is controlled. Each metric can target various sources, such as external services, resource usage, or object states.
Specifies the minimum number of replicas that the Horizontal Pod Autoscaler should maintain.
public int? MinReplicas { get; set; }Remarks
This property sets a lower limit on the number of pod replicas that are maintained by the autoscaler. If not set, it defaults to maintaining at least one instance. A value of 0 can be specified to allow scaling down to zero replicas when no workload demand exists.
Gets or sets the scale target reference for the HorizontalPodAutoscaler.
public CrossVersionObjectReferenceV2 ScaleTargetRef { get; set; }Remarks
The ScaleTargetRef property specifies the target resource to be scaled by the HorizontalPodAutoscaler. This includes details such as the name and API version of the target resource.