VerticalPodAutoscaler
Scope: Namespaced
Configuration for a vertical pod autoscaler, which automatically manages pod resources based on historical and real time resource utilization.
- 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 information in the documentation.
- kind
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 information in the documentation.
- metadata
- spec
Required value
Specification of the behavior of the autoscaler.
More information in the documentation.
- spec.recommenders
Recommender responsible for generating recommendation for this object. List should be empty (then the default recommender will generate the recommendation) or contain exactly one recommender.
VerticalPodAutoscalerRecommenderSelector points to a specific Vertical Pod Autoscaler recommender. In the future it might pass parameters to the recommender.
- spec.recommenders.name
Required value
Name of the recommender responsible for generating recommendation for this object.
- spec.resourcePolicy
Controls how the autoscaler computes recommended resources. The resource policy may be used to set constraints on the recommendations for individual containers.
If any individual containers need to be excluded from getting the VPA recommendations, then it must be disabled explicitly by setting mode to
Off
undercontainerPolicies
.If not specified, the autoscaler computes recommended resources for all containers in the pod, without additional constraints.
- spec.resourcePolicy.containerPolicies
Per-container resource policies.
Controls how autoscaler computes the recommended resources for a specific container.
- spec.resourcePolicy.containerPolicies.containerName
Name of the container or
DefaultContainerResourcePolicy
, in which case the policy is used by the containers that don’t have their own policy specified. - spec.resourcePolicy.containerPolicies.controlledResources
Specifies the type of recommendations that will be computed (and possibly applied) by VPA. If not specified, the default of (
ResourceCPU
,ResourceMemory
) will be used.Default:
["cpu","memory"]
- Element of the array
ResourceName is the name identifying various resources in a ResourceList.
- spec.resourcePolicy.containerPolicies.controlledValues
Specifies which resource values should be controlled.
Default:
"RequestsAndLimits"
Allowed values:
RequestsAndLimits
,RequestsOnly
- spec.resourcePolicy.containerPolicies.maxAllowed
Specifies the maximum amount of resources that will be recommended for the container. The default is no maximum.
- spec.resourcePolicy.containerPolicies.minAllowed
Specifies the minimal amount of resources that will be recommended for the container. The default is no minimum.
- spec.resourcePolicy.containerPolicies.mode
Whether autoscaler is enabled for the container.
Default:
"Auto"
Allowed values:
Auto
,Off
- spec.targetRef
Required value
Points to the controller managing the set of pods for the autoscaler to control — e.g. Deployment, StatefulSet.
VerticalPodAutoscaler can be targeted at controller implementing scale subresource (the pod set is retrieved from the controller’s
ScaleStatus
) or some well known controllers (e.g. for DaemonSet the pod set is read from the controller’s spec).If VerticalPodAutoscaler cannot use specified target it will report
ConfigUnsupported
condition. Note that VerticalPodAutoscaler does not require full implementation of scale subresource — it will not use it to modify the replica count. The only thing retrieved is a label selector matching pods grouped by the target resource.- spec.targetRef.apiVersion
API version of the referent.
- spec.updatePolicy
Describes the rules on how changes are applied to the pods. If not specified, all fields in the
PodUpdatePolicy
are set to their default values.- spec.updatePolicy.evictionRequirements
EvictionRequirements is a list of EvictionRequirements that need to evaluate to true in order for a Pod to be evicted. If more than one EvictionRequirement is specified, all of them need to be fulfilled to allow eviction.
EvictionRequirement defines a single condition which needs to be true in order to evict a Pod.
- spec.updatePolicy.evictionRequirements.changeRequirement
Required value
EvictionChangeRequirement refers to the relationship between the new target recommendation for a Pod and its current requests, what kind of change is necessary for the Pod to be evicted.
Allowed values:
TargetHigherThanRequests
,TargetLowerThanRequests
- spec.updatePolicy.evictionRequirements.resources
Required value
Resources is a list of one or more resources that the condition applies to. If more than one resource is given, the EvictionRequirement is fulfilled if at least one resource meets
changeRequirement
.- Element of the array
ResourceName is the name identifying various resources in a ResourceList.
- spec.updatePolicy.minReplicas
Minimal number of replicas which need to be alive for Updater to attempt pod eviction (pending other checks like PDB). Only positive values are allowed. Overrides global ‘–min-replicas’ flag.
- spec.updatePolicy.updateMode
The operation mode of the VPA controller.
Auto
— currently, Auto and Recreate modes do the same thing. This mode is reserved for the Pod inplace resource update in Kubernetes.Recreate
— this mode allows VPA to modify resource requirements of the running pods (i.e., restart them during operation). This mode might result in temporary unavailability of the service (due to restart) if you have just one replica (replicas: 1). In this mode, VPA does not recreate pods that were not created by a controller.Initial
— VPA modifies pod resources only when pods are started (but not when pods are running).Off
— VPA does not take any action to update the resource requests for the running containers. Autoscaler calculates recomendations and stores them in the status field of the VPA object. You can browse VPA recommendations using the following command:kubectl describe vpa <vpa-name>
.
Default:
"Auto"
Allowed values:
Off
,Initial
,Recreate
,Auto
Deprecated resource. Support for the resource might be removed in a later release.
Configuration for a vertical pod autoscaler, which automatically manages pod resources based on historical and real time resource utilization.
- 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 information in the documentation.
- kind
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 information in the documentation.
- metadata
- spec
Required value
Specification of the behavior of the autoscaler.
More information in the documentation.
- spec.recommenders
Recommender responsible for generating recommendation for this object. List should be empty (then the default recommender will generate the recommendation) or contain exactly one recommender.
VerticalPodAutoscalerRecommenderSelector points to a specific Vertical Pod Autoscaler recommender. In the future it might pass parameters to the recommender.
- spec.recommenders.name
Required value
Name of the recommender responsible for generating recommendation for this object.
- spec.resourcePolicy
Controls how the autoscaler computes recommended resources. The resource policy may be used to set constraints on the recommendations for individual containers.
If any individual containers need to be excluded from getting the VPA recommendations, then it must be disabled explicitly by setting mode to
Off
undercontainerPolicies
.If not specified, the autoscaler computes recommended resources for all containers in the pod, without additional constraints.
- spec.resourcePolicy.containerPolicies
Per-container resource policies.
Controls how autoscaler computes the recommended resources for a specific container.
- spec.resourcePolicy.containerPolicies.containerName
Name of the container or
DefaultContainerResourcePolicy
, in which case the policy is used by the containers that don’t have their own policy specified. - spec.resourcePolicy.containerPolicies.controlledResources
Specifies the type of recommendations that will be computed (and possibly applied) by VPA. If not specified, the default of (
ResourceCPU
,ResourceMemory
) will be used.Default:
["cpu","memory"]
- Element of the array
ResourceName is the name identifying various resources in a ResourceList.
- spec.resourcePolicy.containerPolicies.controlledValues
Specifies which resource values should be controlled.
Default:
"RequestsAndLimits"
Allowed values:
RequestsAndLimits
,RequestsOnly
- spec.resourcePolicy.containerPolicies.maxAllowed
Specifies the maximum amount of resources that will be recommended for the container. The default is no maximum.
- spec.resourcePolicy.containerPolicies.minAllowed
Specifies the minimal amount of resources that will be recommended for the container. The default is no minimum.
- spec.resourcePolicy.containerPolicies.mode
Whether autoscaler is enabled for the container.
Default:
"Auto"
Allowed values:
Auto
,Off
- spec.targetRef
Required value
Points to the controller managing the set of pods for the autoscaler to control — e.g. Deployment, StatefulSet.
VerticalPodAutoscaler can be targeted at controller implementing scale subresource (the pod set is retrieved from the controller’s
ScaleStatus
) or some well known controllers (e.g. for DaemonSet the pod set is read from the controller’s spec).If VerticalPodAutoscaler cannot use specified target it will report
ConfigUnsupported
condition. Note that VerticalPodAutoscaler does not require full implementation of scale subresource — it will not use it to modify the replica count. The only thing retrieved is a label selector matching pods grouped by the target resource.- spec.targetRef.apiVersion
API version of the referent.
- spec.updatePolicy
Describes the rules on how changes are applied to the pods. If not specified, all fields in the
PodUpdatePolicy
are set to their default values.- spec.updatePolicy.evictionRequirements
EvictionRequirements is a list of EvictionRequirements that need to evaluate to true in order for a Pod to be evicted. If more than one EvictionRequirement is specified, all of them need to be fulfilled to allow eviction.
EvictionRequirement defines a single condition which needs to be true in order to evict a Pod.
- spec.updatePolicy.evictionRequirements.changeRequirement
Required value
EvictionChangeRequirement refers to the relationship between the new target recommendation for a Pod and its current requests, what kind of change is necessary for the Pod to be evicted.
Allowed values:
TargetHigherThanRequests
,TargetLowerThanRequests
- spec.updatePolicy.evictionRequirements.resources
Required value
Resources is a list of one or more resources that the condition applies to. If more than one resource is given, the EvictionRequirement is fulfilled if at least one resource meets
changeRequirement
.- Element of the array
ResourceName is the name identifying various resources in a ResourceList.
- spec.updatePolicy.minReplicas
Minimal number of replicas which need to be alive for Updater to attempt pod eviction (pending other checks like PDB). Only positive values are allowed. Overrides global ‘–min-replicas’ flag.
- spec.updatePolicy.updateMode
The operation mode of the VPA controller.
Auto
— currently, Auto and Recreate modes do the same thing. This mode is reserved for the Pod inplace resource update in Kubernetes.Recreate
— this mode allows VPA to modify resource requirements of the running pods (i.e., restart them during operation). This mode might result in temporary unavailability of the service (due to restart) if you have just one replica (replicas: 1). In this mode, VPA does not recreate pods that were not created by a controller.Initial
— VPA modifies pod resources only when pods are started (but not when pods are running).Off
— VPA does not take any action to update the resource requests for the running containers. Autoscaler calculates recomendations and stores them in the status field of the VPA object. You can browse VPA recommendations using the following command:kubectl describe vpa <vpa-name>
.
Default:
"Auto"
Allowed values:
Off
,Initial
,Recreate
,Auto
VerticalPodAutoscalerCheckpoint
Scope: Namespaced
VerticalPodAutoscalerCheckpoint is the checkpoint of the internal state of VPA that is used for recovery after recommender’s restart.
- apiVersion
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 information in the documentation.
- kind
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 information in the documentation.
- metadata
- spec.containerName
Name of the checkpointed container.
- spec.vpaObjectName
Name of the VPA object that stored VerticalPodAutoscalerCheckpoint. object.
Deprecated resource. Support for the resource might be removed in a later release.
VerticalPodAutoscalerCheckpoint is the checkpoint of the internal state of VPA that is used for recovery after recommender’s restart.
- apiVersion
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 information in the documentation.
- kind
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 information in the documentation.
- metadata
- spec.containerName
Name of the checkpointed container.
- spec.vpaObjectName
Name of the VPA object that stored VerticalPodAutoscalerCheckpoint. object.