Unresolved Application reference in HorizontalPodAutoscaler

The purpose of HorizontalPodAutoscaler is to automatically update number of replicas of scalable resources (such as a Deployment or StatefulSet) to match the current demand. This validator detects a condition when a Deployment (or other scalable resource) used in the HorizontalPodAutoscaler is not found.

Affected Resources: HorizontalPodAutoscaler

Examples

apiVersion: autoscaling/v1 kind: HorizontalPodAutoscaler spec: minReplicas: 2 maxReplicas: 5 scaleTargetRef: kind: Deployment name: web-frontend # Missing Deployment apiVersion: apps/v1
apiVersion: apps/v1 kind: Deployment metadata: name: frontend

Resolution

  • Check if the Deployment or StatefulSet is present in the same namespace.
  • Check if the Deployment or StatefulSet is present in a different namespace. Kubevious Search can be a very handy tool to find Deployments or StatefulSets across namespaces. You cannot autoscale Deployments from a different namespaces. In that case you would need to create a HorizontalPodAutoscaler in namespace where your workloads reside.
  • Did you make a typo in the scaleTargetRef spec? Kubevious Search uses fuzzy logic to return results and can help with finding the correct Deployment or StatefulSet.
  • Need other validation rules?

    Please let us know if there are other built-in validation rules you would like to see in Kubevious to detect misconfigurations and violations to best practices. Optionally, you can provide your details so we can reach out to you with follow-up questions.

    Share this article on:
    message