Skip to content

KedifyPodAutoscaler API reference

Generated only: do not author KedifyPodAutoscaler resources directly. The ScaledObject remains the source of truth. KPA controls 1 ↔ N; KEDA owns activation. Supported generated metric types are External, Resource and ContainerResource; generic inherited HPA fields do not establish support for manually authored KPAs.

Group: autoscaling.kedify.io. Kind: KedifyPodAutoscaler. Scope: Namespaced.

Defaults below are schema defaults only. “Not specified” does not imply a controller default of zero or false. Required fields are required within their containing object. Runtime behavior can impose additional conditions described in the capability guide.

Use supported metrics to select a signal. Configure replicas, metrics and behavior through the ScaledObject; use this reference to inspect the generated KPA and its status.

Served: true; storage: true.

FieldTypeRequiredSchema defaultMeaning and validation
specobjectYesNot specifiedHorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.
spec.behaviorobjectNoNot specifiedbehavior 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.
spec.behavior.scaleDownobjectNoNot specifiedscaleDown is scaling policy for scaling Down. If not set, the default value is to allow to scale down to minReplicas pods, with a 300 second stabilization window (i.e., the highest recommendation for the last 300sec is used).
spec.behavior.scaleDown.policiesarrayNoNot specifiedpolicies is a list of potential scaling polices which can be used during scaling. If not set, use the default values: - For scale up: allow doubling the number of pods, or an absolute change of 4 pods in a 15s window. - For scale down: allow all pods to be removed in a 15s window.
spec.behavior.scaleDown.policies[]objectNoNot specifiedHPAScalingPolicy is a single policy which must hold true for a specified past interval.
spec.behavior.scaleDown.policies[].periodSecondsintegerYesNot specifiedperiodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).
spec.behavior.scaleDown.policies[].typestringYesNot specifiedtype is used to specify the scaling policy.
spec.behavior.scaleDown.policies[].valueintegerYesNot specifiedvalue contains the amount of change which is permitted by the policy. It must be greater than zero
spec.behavior.scaleDown.selectPolicystringNoNot specifiedselectPolicy is used to specify which policy should be used. If not set, the default value Max is used.
spec.behavior.scaleDown.stabilizationWindowSecondsintegerNoNot specifiedstabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).
spec.behavior.scaleDown.toleranceinteger or stringNoNot specifiedtolerance is the tolerance on the ratio between the current and desired metric value under which no updates are made to the desired number of replicas (e.g. 0.01 for 1%). Must be greater than or equal to zero. If not set, the default cluster-wide tolerance is applied (by default 10%). For example, if autoscaling is configured with a memory consumption target of 100Mi, and scale-down and scale-up tolerances of 5% and 1% respectively, scaling will be triggered when the actual consumption falls below 95Mi or exceeds 101Mi. This is an beta field and requires the HPAConfigurableTolerance feature gate to be enabled. pattern: ”^(\+|-)?(([0-9]+(\.[0-9])?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9])?)|(\.[0-9]+))))?$”
spec.behavior.scaleUpobjectNoNot specifiedscaleUp is scaling policy for scaling Up. If not set, the default value is the higher of: * increase no more than 4 pods per 60 seconds * double the number of pods per 60 seconds No stabilization is used.
spec.behavior.scaleUp.policiesarrayNoNot specifiedpolicies is a list of potential scaling polices which can be used during scaling. If not set, use the default values: - For scale up: allow doubling the number of pods, or an absolute change of 4 pods in a 15s window. - For scale down: allow all pods to be removed in a 15s window.
spec.behavior.scaleUp.policies[]objectNoNot specifiedHPAScalingPolicy is a single policy which must hold true for a specified past interval.
spec.behavior.scaleUp.policies[].periodSecondsintegerYesNot specifiedperiodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).
spec.behavior.scaleUp.policies[].typestringYesNot specifiedtype is used to specify the scaling policy.
spec.behavior.scaleUp.policies[].valueintegerYesNot specifiedvalue contains the amount of change which is permitted by the policy. It must be greater than zero
spec.behavior.scaleUp.selectPolicystringNoNot specifiedselectPolicy is used to specify which policy should be used. If not set, the default value Max is used.
spec.behavior.scaleUp.stabilizationWindowSecondsintegerNoNot specifiedstabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).
spec.behavior.scaleUp.toleranceinteger or stringNoNot specifiedtolerance is the tolerance on the ratio between the current and desired metric value under which no updates are made to the desired number of replicas (e.g. 0.01 for 1%). Must be greater than or equal to zero. If not set, the default cluster-wide tolerance is applied (by default 10%). For example, if autoscaling is configured with a memory consumption target of 100Mi, and scale-down and scale-up tolerances of 5% and 1% respectively, scaling will be triggered when the actual consumption falls below 95Mi or exceeds 101Mi. This is an beta field and requires the HPAConfigurableTolerance feature gate to be enabled. pattern: ”^(\+|-)?(([0-9]+(\.[0-9])?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9])?)|(\.[0-9]+))))?$”
spec.maxReplicasintegerYesNot specifiedmaxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.
spec.metricsarrayNoNot specifiedmetrics 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.
spec.metrics[]objectNoNot specifiedMetricSpec specifies how to scale based on a single metric (only type and one other matching field should be set at once).
spec.metrics[].containerResourceobjectNoNot specifiedcontainerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the “pods” source.
spec.metrics[].containerResource.containerstringYesNot specifiedcontainer is the name of the container in the pods of the scaling target
spec.metrics[].containerResource.namestringYesNot specifiedname is the name of the resource in question.
spec.metrics[].containerResource.targetobjectYesNot specifiedtarget specifies the target value for the given metric x-kubernetes-validations: [{“message”:“container resource metric target value is unsupported”,“rule”:“!has(self.value)”}]
spec.metrics[].containerResource.target.averageUtilizationintegerNoNot specifiedaverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type
spec.metrics[].containerResource.target.averageValueinteger or stringNoNot specifiedaverageValue is the target value of the average of the metric across all relevant pods (as a quantity) minimum: 1; pattern: ”^[+]?(([0-9][1-9][0-9]([.][0-9])?)|(0[.][0-9][1-9][0-9]))(([KMGTPE]i)|[numkMGTPE]|([eE]([+-])?(([0-9]+([.][0-9]*)?)|([.][0-9]+))))?$”
spec.metrics[].containerResource.target.typestringYesNot specifiedtype represents whether the metric type is Utilization, Value, or AverageValue
spec.metrics[].containerResource.target.valueinteger or stringNoNot specifiedvalue is the target value of the metric (as a quantity). pattern: ”^(\+|-)?(([0-9]+(\.[0-9])?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9])?)|(\.[0-9]+))))?$”
spec.metrics[].externalobjectNoNot specifiedexternal refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).
spec.metrics[].external.metricobjectYesNot specifiedmetric identifies the target metric by name and selector
spec.metrics[].external.metric.namestringYesNot specifiedname is the name of the given metric
spec.metrics[].external.metric.selectorobjectNoNot specifiedSee Kubernetes field definitions.
spec.metrics[].external.targetobjectYesNot specifiedtarget specifies the target value for the given metric
spec.metrics[].external.target.averageUtilizationintegerNoNot specifiedaverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type
spec.metrics[].external.target.averageValueinteger or stringNoNot specifiedaverageValue is the target value of the average of the metric across all relevant pods (as a quantity) minimum: 1; pattern: ”^[+]?(([0-9][1-9][0-9]([.][0-9])?)|(0[.][0-9][1-9][0-9]))(([KMGTPE]i)|[numkMGTPE]|([eE]([+-])?(([0-9]+([.][0-9]*)?)|([.][0-9]+))))?$”
spec.metrics[].external.target.typestringYesNot specifiedtype represents whether the metric type is Utilization, Value, or AverageValue
spec.metrics[].external.target.valueinteger or stringNoNot specifiedvalue is the target value of the metric (as a quantity). minimum: 1; pattern: ”^[+]?(([0-9][1-9][0-9]([.][0-9])?)|(0[.][0-9][1-9][0-9]))(([KMGTPE]i)|[numkMGTPE]|([eE]([+-])?(([0-9]+([.][0-9]*)?)|([.][0-9]+))))?$”
spec.metrics[].objectobjectNoNot specifiedSee Kubernetes field definitions. Inherited schema only; not a supported generated KPA metric type.
spec.metrics[].podsobjectNoNot specifiedSee Kubernetes field definitions. Inherited schema only; not a supported generated KPA metric type.
spec.metrics[].resourceobjectNoNot specifiedresource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the “pods” source.
spec.metrics[].resource.namestringYesNot specifiedname is the name of the resource in question.
spec.metrics[].resource.targetobjectYesNot specifiedtarget specifies the target value for the given metric x-kubernetes-validations: [{“message”:“resource metric target value is unsupported”,“rule”:“!has(self.value)”}]
spec.metrics[].resource.target.averageUtilizationintegerNoNot specifiedaverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type
spec.metrics[].resource.target.averageValueinteger or stringNoNot specifiedaverageValue is the target value of the average of the metric across all relevant pods (as a quantity) minimum: 1; pattern: ”^[+]?(([0-9][1-9][0-9]([.][0-9])?)|(0[.][0-9][1-9][0-9]))(([KMGTPE]i)|[numkMGTPE]|([eE]([+-])?(([0-9]+([.][0-9]*)?)|([.][0-9]+))))?$”
spec.metrics[].resource.target.typestringYesNot specifiedtype represents whether the metric type is Utilization, Value, or AverageValue
spec.metrics[].resource.target.valueinteger or stringNoNot specifiedvalue is the target value of the metric (as a quantity). pattern: ”^(\+|-)?(([0-9]+(\.[0-9])?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9])?)|(\.[0-9]+))))?$”
spec.metrics[].typestringYesNot specifiedtype is the type of metric source. It should be one of “ContainerResource”, “External”, “Object”, “Pods” or “Resource”, each mapping to a matching field in the object.
spec.minReplicasintegerNoNot specifiedminReplicas 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.
spec.scaleTargetRefobjectYesNot specifiedscaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count.
spec.scaleTargetRef.apiVersionstringNoNot specifiedapiVersion is the API version of the referent
spec.scaleTargetRef.kindstringYesNot specifiedkind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
spec.scaleTargetRef.namestringYesNot specifiedname is the name of the referent; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
FieldTypeRequiredSchema defaultMeaning and validation
statusobjectNoNot specifiedHorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.
status.conditionsarrayNoNot specifiedconditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.
status.conditions[]objectNoNot specifiedHorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.
status.conditions[].lastTransitionTimestringNoNot specifiedlastTransitionTime is the last time the condition transitioned from one status to another
status.conditions[].messagestringNoNot specifiedmessage is a human-readable explanation containing details about the transition
status.conditions[].reasonstringNoNot specifiedreason is the reason for the condition’s last transition.
status.conditions[].statusstringYesNot specifiedstatus is the status of the condition (True, False, Unknown)
status.conditions[].typestringYesNot specifiedtype describes the current condition
status.currentMetricsarrayNoNot specifiedSee Kubernetes field definitions.
status.currentReplicasintegerNoNot specifiedcurrentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.
status.desiredReplicasintegerYesNot specifieddesiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.
status.lastScaleTimestringNoNot specifiedlastScaleTime 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.
status.observedGenerationintegerNoNot specifiedobservedGeneration is the most recent generation observed by this autoscaler.
Terminal window
kubectl get crd kedifypodautoscalers.autoscaling.kedify.io -o yaml
kubectl explain kedifypodautoscaler.spec --recursive

Compare served/storage versions and schema before applying configuration. Inspect the resource’s status and events after changing its owning source; schema acceptance alone does not prove successful reconciliation.

Metric sourceKPA backend
ExternalPaired KEDA operator
ResourceKubernetes metrics.k8s.io
ContainerResourceKubernetes metrics.k8s.io

Object and Pods metric sources are not supported. KPA does not independently scale to zero; KEDA continues to own activation, cooldown, and the 0 ↔ 1 transition.