Jump to navigation ↓

HorizontalPodAutoscaler autoscaling/v1

Other versions: v2

configuration of a horizontal pod autoscaler.

Fields

apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata (ObjectMeta)

Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

spec (HorizontalPodAutoscalerSpec)

spec defines the behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.

status (HorizontalPodAutoscalerStatus)

status is the current information about the autoscaler.

HorizontalPodAutoscalerSpec

specification of a horizontal pod autoscaler.

maxReplicas (integer)

maxReplicas is the upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.

scaleTargetRef (CrossVersionObjectReference)

reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource.

minReplicas (integer)

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.

targetCPUUtilizationPercentage (integer)

targetCPUUtilizationPercentage is the target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.

HorizontalPodAutoscalerStatus

current status of a horizontal pod autoscaler

currentReplicas (integer)

currentReplicas is the current number of replicas of pods managed by this autoscaler.

desiredReplicas (integer)

desiredReplicas is the desired number of replicas of pods managed by this autoscaler.

currentCPUUtilizationPercentage (integer)

currentCPUUtilizationPercentage is the current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.

lastScaleTime (Time)

lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed.

observedGeneration (integer)

observedGeneration is the most recent generation observed by this autoscaler.

HorizontalPodAutoscalerList

list of horizontal pod autoscaler objects.

apiVersion: autoscaling/v1
kind: HorizontalPodAutoscalerList
metadata (ListMeta)

Standard list metadata.

items ([]HorizontalPodAutoscaler)

items is the list of horizontal pod autoscaler objects.