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

How to avoid Errors accessing metrics API and CRDs #1113

Open
tmmorin opened this issue Apr 15, 2024 · 1 comment
Open

How to avoid Errors accessing metrics API and CRDs #1113

tmmorin opened this issue Apr 15, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@tmmorin
Copy link

tmmorin commented Apr 15, 2024

Long story short

I'm writing a small controller with no CRD associated that only reacts to changes on Nodes and Pods.

For reasons unrelated to this issue (which I'm solving separately) I see this kind of errors on startup:

[2024-04-15 13:25:28,246] kopf._core.reactor.o [ERROR   ] Request attempt #1/9 failed; will retry: GET https://100.73.0.1:443/apis/metrics.k8s.io/v1beta1 -> APIServerError(None, None)                                                           
[2024-04-15 13:25:29,252] kopf._core.reactor.o [ERROR   ] Request attempt #2/9 failed; will retry: GET https://100.73.0.1:443/apis/metrics.k8s.io/v1beta1 -> APIServerError(None, None)  

And, similarly:

[2024-04-15 13:26:33,105] kopf._core.reactor.o [ERROR   ] Request attempt #1/9 failed; will retry: GET https://100.73.0.1:443/apis/metallb.io/v1beta1 -> ClientConnectorError(ConnectionKey(host='100.73.0.1', port=443, is_ssl=True, ssl=True, pr
oxy=None, proxy_auth=None, proxy_headers_hash=-7154211259067671165), OSError(113, "Connect call failed ('100.73.0.1', 443)"))                                                                                                                                                                                     
[2024-04-15 13:26:33,106] kopf._core.reactor.o [ERROR   ] Request attempt #1/9 failed; will retry: GET https://100.73.0.1:443/apis/ipam.cluster.x-k8s.io/v1alpha1 -> ClientConnectorError(ConnectionKey(host='100.73.0.1', port=443, is_ssl=True, 
ssl=True, proxy=None, proxy_auth=None, proxy_headers_hash=-7154211259067671165), OSError(113, "Connect call failed ('100.73.0.1', 443)"))    

At some point Kopf framework abandons...

My question is the following: **given that my controller does not do anything with the metrics API or with CRDs, could I configure Kopf so that it would not try to fetch all of this ?

Kopf version

1.37.2

Kubernetes version

1.28.8

Python version

3.12

Code

No response

Logs

No response

Additional information

No response

@tmmorin tmmorin added the bug Something isn't working label Apr 15, 2024
@fk128
Copy link

fk128 commented Apr 27, 2024

You could just deploy the metrics server on your cluster to see if that solves your problem. It's lightweight. https://github.com/kubernetes-sigs/metrics-server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants