What Can I Do If an HPA Created on the Federation Management Plane Fails to Be Distributed to Member Clusters?
Context
After an HPA is created on the federation management plane and PropagationPolicy is created, the HPA fails to be distributed to a member cluster earlier than v1.23.
Possible Cause
Currently, the API server version of the UCS cluster federation is 1.25. Therefore, the HPA has two versions: autoscaling/v2 and autoscaling/v1. However, only HPA autoscaling/v2 is distributed. Clusters earlier than v1.23 do not support HPA autoscaling/v2. As a result, the HPA cannot be distributed to the member cluster earlier than v1.23. Check resourceBinding of the HPA. The error message "cluster(s) did not have the API resource" is displayed.
Solution
Before distributing the HPA, you can upgrade the member cluster to v1.23 or later, which supports the HPA autoscaling/v2 by default.
If you still want to distribute HPA autoscaling/v1 to member clusters, set the resourceSelectors[i].apiVersion field in your PropagationPolicy to autoscaling/v2, as shown in the example YAML. After the distribution is successful, you can query HPA autoscaling/v1 in the member cluster.
apiVersion: autoscaling/v1 kind: HorizontalPodAutoscaler metadata: name: test-hpa spec: maxReplicas: 5 minReplicas: 1 scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: nginx targetCPUUtilizationPercentage: 10 --- apiVersion: policy.karmada.io/v1alpha1 kind: PropagationPolicy metadata: name: test-hpa-pp spec: placement: clusterAffinity: clusterNames: - member1 resourceSelectors: - apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler name: test-hpa namespace: default
Fleets FAQs
- Why Can't I Enable Cluster Federation for a Fleet or Register a Cluster to a Fleet After Cluster Federation Is Enabled?
- How Do I Rectify the Fault If Pre-upgrade Checks of A Cluster Federation Fail?
- What Can I Do If an Abnormal, Federated Cluster Fails to Be Removed from the Fleet?
- What Can I Do If a Cluster Fails to Be Added to a Federation?
- What Can I Do If an HPA Created on the Federation Management Plane Fails to Be Distributed to Member Clusters?
- What Can I Do If an Nginx Ingress Is in the Unready State After Being Deployed?
- What Can I Do If the MCI Object Creation Fails?
- What Can I Do If the MCS Object Creation Fails?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbotmore