Skip to content

autoscaling.v1.horizontalPodAutoscalerSpec

"specification of a horizontal pod autoscaler."

Index

Fields

fn withMaxReplicas

withMaxReplicas(maxReplicas)

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

fn withMinReplicas

withMinReplicas(minReplicas)

"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."

fn withTargetCPUUtilizationPercentage

withTargetCPUUtilizationPercentage(targetCPUUtilizationPercentage)

"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."

obj scaleTargetRef

"CrossVersionObjectReference contains enough information to let you identify the referred resource."

fn scaleTargetRef.withApiVersion

withApiVersion(apiVersion)

"apiVersion is the API version of the referent"

fn scaleTargetRef.withKind

withKind(kind)

"kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"

fn scaleTargetRef.withName

withName(name)

"name is the name of the referent; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"