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.
API details
Section titled “API details”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.
v1alpha1 fields
Section titled “v1alpha1 fields”Served: true; storage: true.
| Field | Type | Required | Schema default | Meaning and validation |
|---|---|---|---|---|
spec | object | Yes | Not specified | HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler. |
spec.behavior | object | No | Not specified | behavior 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.scaleDown | object | No | Not specified | scaleDown 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.policies | array | No | Not specified | policies 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[] | object | No | Not specified | HPAScalingPolicy is a single policy which must hold true for a specified past interval. |
spec.behavior.scaleDown.policies[].periodSeconds | integer | Yes | Not specified | periodSeconds 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[].type | string | Yes | Not specified | type is used to specify the scaling policy. |
spec.behavior.scaleDown.policies[].value | integer | Yes | Not specified | value contains the amount of change which is permitted by the policy. It must be greater than zero |
spec.behavior.scaleDown.selectPolicy | string | No | Not specified | selectPolicy is used to specify which policy should be used. If not set, the default value Max is used. |
spec.behavior.scaleDown.stabilizationWindowSeconds | integer | No | Not specified | stabilizationWindowSeconds 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.tolerance | integer or string | No | Not specified | tolerance 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.scaleUp | object | No | Not specified | scaleUp 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.policies | array | No | Not specified | policies 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[] | object | No | Not specified | HPAScalingPolicy is a single policy which must hold true for a specified past interval. |
spec.behavior.scaleUp.policies[].periodSeconds | integer | Yes | Not specified | periodSeconds 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[].type | string | Yes | Not specified | type is used to specify the scaling policy. |
spec.behavior.scaleUp.policies[].value | integer | Yes | Not specified | value contains the amount of change which is permitted by the policy. It must be greater than zero |
spec.behavior.scaleUp.selectPolicy | string | No | Not specified | selectPolicy is used to specify which policy should be used. If not set, the default value Max is used. |
spec.behavior.scaleUp.stabilizationWindowSeconds | integer | No | Not specified | stabilizationWindowSeconds 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.tolerance | integer or string | No | Not specified | tolerance 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.maxReplicas | integer | Yes | Not specified | maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas. |
spec.metrics | array | No | Not specified | metrics 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[] | object | No | Not specified | MetricSpec specifies how to scale based on a single metric (only type and one other matching field should be set at once). |
spec.metrics[].containerResource | object | No | Not specified | containerResource 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.container | string | Yes | Not specified | container is the name of the container in the pods of the scaling target |
spec.metrics[].containerResource.name | string | Yes | Not specified | name is the name of the resource in question. |
spec.metrics[].containerResource.target | object | Yes | Not specified | target 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.averageUtilization | integer | No | Not specified | averageUtilization 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.averageValue | integer or string | No | Not specified | averageValue 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.type | string | Yes | Not specified | type represents whether the metric type is Utilization, Value, or AverageValue |
spec.metrics[].containerResource.target.value | integer or string | No | Not specified | value 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[].external | object | No | Not specified | external 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.metric | object | Yes | Not specified | metric identifies the target metric by name and selector |
spec.metrics[].external.metric.name | string | Yes | Not specified | name is the name of the given metric |
spec.metrics[].external.metric.selector | object | No | Not specified | See Kubernetes field definitions. |
spec.metrics[].external.target | object | Yes | Not specified | target specifies the target value for the given metric |
spec.metrics[].external.target.averageUtilization | integer | No | Not specified | averageUtilization 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.averageValue | integer or string | No | Not specified | averageValue 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.type | string | Yes | Not specified | type represents whether the metric type is Utilization, Value, or AverageValue |
spec.metrics[].external.target.value | integer or string | No | Not specified | value 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[].object | object | No | Not specified | See Kubernetes field definitions. Inherited schema only; not a supported generated KPA metric type. |
spec.metrics[].pods | object | No | Not specified | See Kubernetes field definitions. Inherited schema only; not a supported generated KPA metric type. |
spec.metrics[].resource | object | No | Not specified | resource 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.name | string | Yes | Not specified | name is the name of the resource in question. |
spec.metrics[].resource.target | object | Yes | Not specified | target 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.averageUtilization | integer | No | Not specified | averageUtilization 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.averageValue | integer or string | No | Not specified | averageValue 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.type | string | Yes | Not specified | type represents whether the metric type is Utilization, Value, or AverageValue |
spec.metrics[].resource.target.value | integer or string | No | Not specified | value 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[].type | string | Yes | Not specified | type 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.minReplicas | integer | No | Not specified | 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. |
spec.scaleTargetRef | object | Yes | Not specified | scaleTargetRef 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.apiVersion | string | No | Not specified | apiVersion is the API version of the referent |
spec.scaleTargetRef.kind | string | Yes | Not specified | kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
spec.scaleTargetRef.name | string | Yes | Not specified | name is the name of the referent; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
status
Section titled “status”| Field | Type | Required | Schema default | Meaning and validation |
|---|---|---|---|---|
status | object | No | Not specified | HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler. |
status.conditions | array | No | Not specified | conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met. |
status.conditions[] | object | No | Not specified | HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point. |
status.conditions[].lastTransitionTime | string | No | Not specified | lastTransitionTime is the last time the condition transitioned from one status to another |
status.conditions[].message | string | No | Not specified | message is a human-readable explanation containing details about the transition |
status.conditions[].reason | string | No | Not specified | reason is the reason for the condition’s last transition. |
status.conditions[].status | string | Yes | Not specified | status is the status of the condition (True, False, Unknown) |
status.conditions[].type | string | Yes | Not specified | type describes the current condition |
status.currentMetrics | array | No | Not specified | See Kubernetes field definitions. |
status.currentReplicas | integer | No | Not specified | currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler. |
status.desiredReplicas | integer | Yes | Not specified | desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler. |
status.lastScaleTime | string | No | Not specified | 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. |
status.observedGeneration | integer | No | Not specified | observedGeneration is the most recent generation observed by this autoscaler. |
Inspect the installed contract
Section titled “Inspect the installed contract”kubectl get crd kedifypodautoscalers.autoscaling.kedify.io -o yamlkubectl explain kedifypodautoscaler.spec --recursiveCompare 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.
Use, verify and diagnose
Section titled “Use, verify and diagnose”- Kedify Pod Autoscaler (KPA)
- Install and verify multi-tenant scaling
- Diagnose multi-cluster and tenant controllers
Supported metrics
Section titled “Supported metrics”| Metric source | KPA backend |
|---|---|
External | Paired KEDA operator |
Resource | Kubernetes metrics.k8s.io |
ContainerResource | Kubernetes 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.