-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
couldn't get resource list for external.metrics.k8s.io/v1beta1: Got empty response for: external.metrics.k8s.io/v1beta1 #4224
Comments
Hi, I know it's annoying, but it isn't something we can solve from our side without consolidating the solution with the upstream. How can you do it? You can create a ScaledObject for one workload, adding a trigger which does nothing, for example a cron trigger with desired replicas 1, this will expose that metric, patching the error you see.
This will create a dummy workload which will be always scale to 0, but exposing 1 metric and patching the issue |
Update : it works, the error does not seem to occur anymore. Thank you so much @JorTurFer . |
@JorTurFer I am seeing this problem . I have:
Kubernetes is AWS EKS. I have this helm chart installed:
If I do:
I see:
Any idea how to fix this? |
@JorTurFer Thanks for the pointer to the workaround. Will a more comprehensive fix be introduced? |
The problem has been fixed in kube-client package (where it was introduced) , the problem is that it hasn't been released. |
Do you know which is the fix in client-go addresses the problem? Do you know if this version of client-go in kubectl has the fix: |
This is the PR: kubernetes/kubernetes#115978 |
@JorTurFer If I look at kubernetes/kubernetes#115978 , I see that got merged in this commit: kubernetes/kubernetes@6bfa937 and the tags listed on that are: I'm running kubectl For this fix to work properly, do I need kubectl AND the Kubernetes server to be at versions >= 1.27? |
I don't know but I don't think so. Maybe you could ask in k8s repo directly :) |
OK, I asked here: kubernetes/kubernetes#115978 (comment) |
Getting the same issue here too Kubectl and Kubernetes (GKE) are both at v1.26.3. |
This commit, released as part of KEDA v2.11, patches the issue in KEDA side even if the tooling isn't up-to-date |
@JorTurFer for the commit that you mentioned, can you clarify which tooling is not up-to-date? |
Hi That's why I said that you tooling could be out-dated. As this issue is related with the k8s tooling and you posted here, I thought that you are affected too. If your issue is different than this because you have at least 1 ScaledObject (with other metrics that CPU or Memory, only with these it could happen too), or if you are using KEDA v2.11 (we added a patch to prevent the bug in the tooling) or if you are using latest versions, probably you are affected by other cause. in that case, could you open an issue to track it and look for the solution? 🙏 |
I removed keda from my cluster because I was getting so many of the same type of error reported in. the original bug report for this issue. So I do not have any ScaledObject right now in my cluster. It might be useful to compile a table of the common tooling (kubectl, helm) that has the correct fix, similar The dependencies of this problem span so many systems on the server and client, that I barely understand what is required for a full fix. |
If your problem were related with this issue and KEDA, just deploying KEDA v2.11 it's enough.
I guess that I'm not getting your question, what fo you mean?
I have answered above, just upgrading KEDA to v2.11 it's enough because we have adopted the new approach from the SIG. Thanks to it, it doesn't matter if the tooling is up-to-date or not, because the SIG-Autoscaling have changed the upstream approach to prevent this and other problems in the clients. You can read more about the problem and the solution here: kubernetes-sigs/custom-metrics-apiserver#150 do you have any other question? |
And just to clarify, all that I said in my previous comment only applies if your problem was the same. If you had other problem than the root cause here, the best option is opening another issue to track it, dig in the problem and fix it. Just installing KEDA v2.11, we can know if the issue was the same, if it's solved now, the issue was the same 😄 |
Report
Well, it happens all the time, I can't use KEDA locally for testing.
The error :
Tried on:
Expected Behavior
Proper communication with metric-server and presenting the resources.
Actual Behavior
I've made some stress tests and the deployments weren't being scaled.
Steps to Reproduce the Problem
Simple example :
After that, most of the times simply running
kubectl get all -n keda
is enough to raise the error. In a very few attempts I had to try creating a ScaledObject and then it happened immediately. I can't even check if it is a problem with my ScaledObject because the error keeps occurring even after deleting the objects.Logs from KEDA operator
KEDA Version
2.9.2
Kubernetes Version
1.26
Platform
None
Scaler Details
CPU, Memory
Anything else?
Yes, I have ALREADY seen the workaround comment on another issue telling to "create a dummy resource".
I could be missing something, but as far as I can tell, the resources should be presented to me and if it is mandatory to do something else, it should be very explicit in the docs.
I don't have any idea of what I should to to create this dummy resource and what exactly that means.
The text was updated successfully, but these errors were encountered: