Kubernetes Horizontal Pod Autoscaler Not Scaling Up Correctly in GKE
I'm getting frustrated with I'm relatively new to this, so bear with me. I'm having issues with the Horizontal Pod Autoscaler (HPA) in my GKE cluster. Despite my deployment metrics indicating that the CPU utilization is well above the target threshold, the HPA is not scaling up the pods as expected. I've defined the HPA like this: ```yaml apiVersion: autoscaling/v2beta2 kind: HorizontalPodAutoscaler metadata: name: my-app-hpa spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: my-app minReplicas: 2 maxReplicas: 10 metrics: - type: Resource resource: name: cpu target: type: Utilization averageUtilization: 70 ``` Currently, my application has 3 replicas, and the CPU usage has been hovering around 85% for over 10 minutes. However, in the HPA status, I see this: ```json { "apiVersion": "autoscaling/v2beta2", "kind": "HorizontalPodAutoscaler", "status": { "currentReplicas": 3, "desiredReplicas": 3, "conditions": [ { "type": "AbleToScale", "status": "True" }, { "type": "ScalingActive", "status": "True" }, { "type": "MetricsSeen", "status": "False" } ] } } ``` The `MetricsSeen` condition is set to `False`, which seems to suggest that the HPA is not receiving the metrics data properly. I've verified that the metrics server is running and functioning as expected: ```bash kubectl get deployment metrics-server -n kube-system ``` This shows that all replicas of the metrics server are up and running. I also checked the logs for the metrics server and did not see any errors indicating issues with scraping metrics from my deployment. Could this be a question with the way I've configured the metrics server or HPA? I've also looked into the service account permissions but everything seems fine. Any guidance or troubleshooting steps would be greatly appreciated! For context: I'm using Yaml on macOS. Any help would be greatly appreciated! I'm working with Yaml in a Docker container on CentOS. What am I doing wrong?