⎈ k8s knowledge compiler

HorizontalPodAutoscaler [page]deterministic

HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.

reference

`apiVersion: autoscaling/v2`

`import "k8s.io/api/autoscaling/v2"`

## HorizontalPodAutoscaler {#HorizontalPodAutoscaler}

HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.

<hr>

<table> <thead><tr><th>Field</th><th>Description</th></tr></thead> <tbody> <tr> <td><code>apiVersion</code><br/><em>string</em></td> <td>APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources</td> </tr> <tr> <td><code>kind</code><br/><em>string</em></td> <td>Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds</td> </tr> <tr> <td><code>metadata</code><br/><em><a href="">ObjectMeta</a></em></td> <td>metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata</td> </tr> <tr> <td><code>spec</code>&nbsp;<strong>*</strong><br/><em><a href="">HorizontalPodAutoscalerSpec</a></em></td> <td>spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.</td> </tr> <tr> <td><code>status</code><br/><em><a href="">HorizontalPodAutoscalerStatus</a></em></td> <td>status is the current information about the autoscaler.</td> </tr> </tbody> </table>

## HorizontalPodAutoscalerSpec {#HorizontalPodAutoscalerSpec}

HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.

<hr>

<table> <thead><tr><th>Field</th><th>Description</th></tr></thead> <tbody> <tr> <td><code>behavior</code><br/><em><a href="">HorizontalPodAutoscalerBehavior</a></em></td> <td>behavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively). If not set, the default HPAScalingRules for scale up and scale down are used.</td> </tr> <tr> <td><code>maxReplicas</code>&nbsp;<strong>*</strong><br/><em>integer</em></td> <td>maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.</td> </tr> <tr> <td><code>metrics</code><br/><em><a href="">MetricSpec array</a></em></td> <td>metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the default metric will be set to 80% average CPU utilization.</td> </tr> <tr> <td><code>minReplicas</code><br/><em>integer</em></td> <td>minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured. Scaling is active as long as at least one metric value is available.</td> </tr> <tr> <td><code>scaleTargetRef</code>&nbsp;<strong>*</strong><br/><em><a href="">CrossVersionO …(trimmed)

Sources

reference/kubernetes-api/autoscaling/horizontal-pod-autoscaler-v2.md · docHorizontalPodAutoscaler

Related (25)

part_of HPAScalingPolicy {#HPAScalingPolicy}describes conf=1
part_of HPAScalingRules {#HPAScalingRules}describes conf=1
part_of MetricIdentifier {#MetricIdentifier}describes conf=1
part_of MetricSpec {#MetricSpec}describes conf=1
part_of MetricStatus {#MetricStatus}describes conf=1
part_of MetricTarget {#MetricTarget}describes conf=1
part_of MetricValueStatus {#MetricValueStatus}describes conf=1
part_of ObjectMetricSource {#ObjectMetricSource}describes conf=1
part_of ObjectMetricStatus {#ObjectMetricStatus}describes conf=1
part_of PodsMetricSource {#PodsMetricSource}describes conf=1
part_of PodsMetricStatus {#PodsMetricStatus}describes conf=1
part_of Operations {#Operations}describes conf=1

← all Docs