Skip to content
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

Custom metrics adapter spewing errors "apiserver was unable to write a fallback JSON response: http2: stream closed" #510

Open
red8888 opened this issue Feb 22, 2023 · 11 comments
Labels
custom-metrics-stackdriver-adapter Issues for custom-metrics-stackdriver-adapter

Comments

@red8888
Copy link

red8888 commented Feb 22, 2023

GKE version: 1.23.14-gke.1800
metrics adapter version: gcr.io/gke-release/custom-metrics-stackdriver-adapter:v0.12.2-gke.0

Adapter was installed via:
https://raw.githubusercontent.com/GoogleCloudPlatform/k8s-stackdriver/master/custom-metrics-stackdriver-adapter/deploy/production/adapter_new_resource_model.yaml

This doesn't throw an error: kubectl get --raw "/apis/custom.metrics.k8s.io/v1beta1"

But its spewing these errors:
image

I saw in some github issues people saying it was lack of resources but when I look at the metrics it seems well under utilized:
image

I don't think its failing to read metrics, but these errors are filling up my logs and they concern me.

@5imun
Copy link

5imun commented Apr 19, 2023

@red8888 I had the same issue, I had to deploy adapter_new_resource_model.yaml because I wanted to use external metrics but in this file along with v1beta1.external.metrics.k8s.io service you also get v1beta1.custom.metrics.k8s.io and v1beta2.custom.metrics.k8s.io.

Since I didn't use any custom metrics in the cluster so I just removed v1beta1.custom.metrics.k8s.io and v1beta2.custom.metrics.k8s.io APIServices and now I don't get these logs (this obviously won't work if you need custom metrics for scaling)

@4wdonny
Copy link

4wdonny commented Apr 21, 2023

Ran into this as well. Any advice on a solution would be welcome. our Pubsub autoscalers stopped functioning and we can't tell if this message is causational or correlational

@Batuu13
Copy link

Batuu13 commented May 12, 2023

I have the same issue, any solutions?

@ajaykumar-gbi
Copy link

I have the same issue on GKE 1.25+

@ajaykumar-gbi
Copy link

@red8888 Did you find any solution for this ?

@n-oden
Copy link

n-oden commented May 31, 2023

FWIW I was able to work around this in the same way @5imun did -- I removed the APIService registrations for custom metrics. But this is obviously not a great solution. :(

@bigbitbus
Copy link

Same issue - cant use custom metrics for hpa autoscaling in GKE because of this.

@sosimon
Copy link

sosimon commented Jul 26, 2023

Same issue here: #318

@bigbitbus
Copy link

bigbitbus commented Sep 17, 2023

We have the same issue. Fortunately we wanted Pubsub-based autoscaling so that is an external-metric, so the solution that @5imun suggested worked for us.

@didlawowo
Copy link

should be a good idea to understand why we have those message

@CatherineF-dev
Copy link
Contributor

CatherineF-dev commented Jan 19, 2024

Update: this PR only fixes OOM and this spam log has not been fixed.


Hi, could you try v0.14.2? It contains the fix #623

@CatherineF-dev CatherineF-dev added the custom-metrics-stackdriver-adapter Issues for custom-metrics-stackdriver-adapter label Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
custom-metrics-stackdriver-adapter Issues for custom-metrics-stackdriver-adapter
Projects
None yet
Development

No branches or pull requests

10 participants