HorizontalPodAutoscaler
apiVersion: autoscaling/v1
import "k8s.io/api/autoscaling/v1"
HorizontalPodAutoscaler
configuration of a horizontal pod autoscaler.
HorizontalPodAutoscalerSpec
specification of a horizontal pod autoscaler.
-
maxReplicas (int32), required
upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
-
scaleTargetRef (CrossVersionObjectReference), required
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.
CrossVersionObjectReference contains enough information to let you identify the referred resource.
-
scaleTargetRef.kind (string), required
Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
-
scaleTargetRef.name (string), required
-
scaleTargetRef.apiVersion (string)
API version of the referent
-
-
minReplicas (int32)
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 (int32)
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 (int32), required
current number of replicas of pods managed by this autoscaler.
-
desiredReplicas (int32), required
desired number of replicas of pods managed by this autoscaler.
-
currentCPUUtilizationPercentage (int32)
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)
last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed.
Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.
-
observedGeneration (int64)
most recent generation observed by this autoscaler.
HorizontalPodAutoscalerList
list of horizontal pod autoscaler objects.
-
apiVersion: autoscaling/v1
-
kind: HorizontalPodAutoscalerList
-
metadata (
Standard list metadata.
Operations
get
read the specified HorizontalPodAutoscaler
HTTP Request
GET /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}
Parameters
-
name (in path): string, required
name of the HorizontalPodAutoscaler
-
namespace (in path): string, required
-
pretty (in query): string
Response
200 (
401: Unauthorized GET /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status name (in path): string, required name of the HorizontalPodAutoscaler namespace (in path): string, required pretty (in query): string 200 (
401: Unauthorized GET /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers namespace (in path): string, required allowWatchBookmarks (in query): boolean continue (in query): string fieldSelector (in query): string labelSelector (in query): string limit (in query): integer pretty (in query): string resourceVersion (in query): string resourceVersionMatch (in query): string timeoutSeconds (in query): integer watch (in query): boolean 200 (
401: Unauthorized GET /apis/autoscaling/v1/horizontalpodautoscalers allowWatchBookmarks (in query): boolean continue (in query): string fieldSelector (in query): string labelSelector (in query): string limit (in query): integer pretty (in query): string resourceVersion (in query): string resourceVersionMatch (in query): string timeoutSeconds (in query): integer watch (in query): boolean 200 (
401: Unauthorized POST /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers namespace (in path): string, required dryRun (in query): string fieldManager (in query): string fieldValidation (in query): string pretty (in query): string 200 (
201 (
202 (
401: Unauthorized PUT /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name} name (in path): string, required name of the HorizontalPodAutoscaler namespace (in path): string, required dryRun (in query): string fieldManager (in query): string fieldValidation (in query): string pretty (in query): string 200 (
201 (
401: Unauthorized PUT /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status name (in path): string, required name of the HorizontalPodAutoscaler namespace (in path): string, required dryRun (in query): string fieldManager (in query): string fieldValidation (in query): string pretty (in query): string 200 (
201 (
401: Unauthorized PATCH /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name} name (in path): string, required name of the HorizontalPodAutoscaler namespace (in path): string, required dryRun (in query): string fieldManager (in query): string fieldValidation (in query): string force (in query): boolean pretty (in query): string 200 (
201 (
401: Unauthorized PATCH /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status name (in path): string, required name of the HorizontalPodAutoscaler namespace (in path): string, required dryRun (in query): string fieldManager (in query): string fieldValidation (in query): string force (in query): boolean pretty (in query): string 200 (
201 (
401: Unauthorized DELETE /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name} name (in path): string, required name of the HorizontalPodAutoscaler namespace (in path): string, required dryRun (in query): string gracePeriodSeconds (in query): integer pretty (in query): string propagationPolicy (in query): string 200 (
202 (
401: Unauthorized DELETE /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers namespace (in path): string, required continue (in query): string dryRun (in query): string fieldSelector (in query): string gracePeriodSeconds (in query): integer labelSelector (in query): string limit (in query): integer pretty (in query): string propagationPolicy (in query): string resourceVersion (in query): string resourceVersionMatch (in query): string timeoutSeconds (in query): integer 200 (
401: Unauthorizedget
read status of the specified HorizontalPodAutoscalerHTTP Request
Parameters
Response
list
list or watch objects of kind HorizontalPodAutoscalerHTTP Request
Parameters
Response
list
list or watch objects of kind HorizontalPodAutoscalerHTTP Request
Parameters
Response
create
create a HorizontalPodAutoscalerHTTP Request
Parameters
Response
update
replace the specified HorizontalPodAutoscalerHTTP Request
Parameters
Response
update
replace status of the specified HorizontalPodAutoscalerHTTP Request
Parameters
Response
patch
partially update the specified HorizontalPodAutoscalerHTTP Request
Parameters
Response
patch
partially update status of the specified HorizontalPodAutoscalerHTTP Request
Parameters
Response
delete
delete a HorizontalPodAutoscalerHTTP Request
Parameters
Response
deletecollection
delete collection of HorizontalPodAutoscalerHTTP Request
Parameters
Response