-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HPA not working, unknown target CPU #4456
Comments
Did you deploy metrics-server ? |
Yes @afbjorklund ... |
Finally I did like this ...now its working https://stackoverflow.com/questions/54106725/docker-kubernetes-mac-autoscaler-unable-to-find-metrics |
It's unclear what the issue is with minikube is here? Are we providing a broken metrics-server? |
Seems like there is some kind of issue with certificates and/or IP, workaround is disabling those:
Could be related to a broken DNS (somehow), or could be our broken InternalIP (vs. hostname) ? |
I have same problem but the solution of @devarajchidambaram didn't work for me. |
The deployment file should contain To read more on this, refer to the autoscaler algorithm: |
@nikhils5501 Thanks, this solved it for me. More specifically I added the
|
I can reproduce this on: I tried adding
but it didn't work. Minikube keeps restoring |
@Cristian04 |
Not really. I am having this issue when I add metrics into the hpa.
I think is related to this bug |
@Cristian04 You need to have metrics-server installed on your cluster. I hope that should solve it for you. Metrics-server is the alternative for Heapster. |
Yes, I am using metric-server and it's running on my cluster. Not using heapster as it is deprecated. Updates:I've retested on:Minikube v1.6.1 + metric-server Metrics started working after 5 minutes of seeing this:
Minikube v1.5.2 + metric-server: Result: Not working
HPA with unknown status:
metric-server log
Minikube v1.3.0 + metrics-server Result: Working without workarounds Steps
Verify with:
|
Fix for Minikube v1.5.2 + K8S v1.16.2 Disable the metric-server addon and install from https://github.com/kubernetes-sigs/metrics-server
I think we can close the issue with that |
@Cristian04 @devarajchidambaram we just merged a PR that improves the metrics-server addon, (it is on the master and will be in the next release) do you mind checking the minikube that would help with this issue ? |
@medyagh Yeah, Im fine with that. Feel free to assign this ticket to me if required. |
I think this issue had been resolved.
and I confirmed HPA is working.
|
In case it's not obvious how to fix
|
In my case, the only deployment of metrics-server that worked for hpa, is this one that I share with you, I tried it with docker-desktop |
Im trying to auto scale the kuber pods but not able to get the hpa cpu metrics . so its failing to auto scale.
deployment.yaml
Ingress.yaml
Services.yaml
CMD output
Here horizontalpodautoscaler.autoscaling/kubernetes-tutorial-deployment showing target is UNKNOWN.
This is the error I got
Im new to the kubernetes . so I don't know , how to proceed further.
The text was updated successfully, but these errors were encountered: