Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Autoscaler can't get Current CPU utilization #6239
I have configured my cluster metrics. I'm able to see them in the webconsole.
It looks fine, for every pod I have, I get the metrics (using heapster).
This are the logs of my heapster pod:
I scaled my test-project and it's using 40 pods.
I know the auto-scaler needs the cluster metrics. But that's working fine so I would think it should work but it isn't:
Can you post your DeploymentConfig JSON/YAML? Additionally, if you have access to the logs, do you see anything there? There's a couple issues that could be occurring (e.g. Origin might not be able to connect to Heapster or there's some incorrect configuration on you DC -- you need to specify CPU requests on your pods for the HPA to work).
There is an 'error' but I think it was because I started my Origin-server at that moment so everything was recreated.
I used this template to create it all, hope this helps:
and to execute:
It's working and showing up in the metrics-tab in my webconsole. But it's unaccessible for my autoscaler.
The logs of my heapster look different than a few hours ago:
Logs in my webconsole:
The steps I perform to set up my heapster are just these steps: https://docs.openshift.org/latest/install_config/cluster_metrics.html#metrics-deployer
Litterally following them with oc secrets new metrics-deployer nothing=/dev/null and persistent storage: false. It works except for my hpa
Yeah, it looks like you're missing a CPU request on your pods (to confirm, I'd need to see the output of
... spec: containers: - image: nginx name: nginx resources: requests: cpu: 400m ...
Hi, I've been following this issue because I have the same problem with the same configuration but the last configuration doesn't fix the problem.
Heapster is running in openshift-infra project while the pods and hpa are running in a different project.
This is the the hpa:
oc describe hpa frontend-scaler Name: frontend-scaler Namespace: Labels: CreationTimestamp: Fri, 11 Dec 2015 08:41:14 +0000 Reference: DeploymentConfig/jupyter-requests/scale Target CPU utilization: 70% Current CPU utilization: Min replicas: 1 Max replicas: 3
Logs in web-console:
9:40:04 AM HorizontalPodAutoscaler frontend-scaler FailedComputeReplicas failed to get cpu utilization: failed to get CPU consumption and request: metrics obtained for 0/1 of pods 9:40:04 AM HorizontalPodAutoscaler frontend-scaler FailedGetMetrics failed to get CPU consumption and request: metrics obtained for 0/1 of pods
This is the output of kubectl get dc:
... spec: containers: - image: .../openshift/jupyter-python imagePullPolicy: IfNotPresent name: jupyter-requests ports: - containerPort: 8000 protocol: TCP resources: limits: cpu: 200m memory: 400Mi requests: cpu: 100m memory: 200Mi ....