You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error "unable to retrieve the complete list of server APIs: metrics.k8s.io" when any K8s resource is being created by operator through ansible K8s module. #5596
We are trying to deploy a CNF in K8s cluster 1.23.1 with ansible operator from quay.io and following error is coming. This is seen when the metrics-server is installed. If metrics-server is deleted, this error is not seen and all the K8s resources are created fine by the Operator.
{"level":"error","ts":1646985248.079765,"logger":"proxy","msg":"Unable to determine if virtual resource","gvk":"/v1, Kind=Service","error":"unable to retrieve the complete list of server APIs: metrics.k8s.io/v1beta1: an error on the server ("Internal Server Error: \"/apis/metrics.k8s.io/v1beta1?timeout=32s\": the server could not find the requested resource") has prevented the request from succeeding","stacktrace":"github.com/operator-framework/operator-sdk/internal/ansible/proxy.(*cacheResponseHandler).ServeHTTP\n\t/workspace/internal/ansible/proxy/cache_response.go:97\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2879\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1930"}
Note 1: This issue is not seen in the previous version of K8s. Issue is coming after upgrade to K8s 1.23.
Note: In the role used by the operator, metrics.k8s.io is added.
apiGroups:
metrics.k8s.io
resources:
'*'
verbs:
'*'
What did you expect to see?
No error when a k8s resource is created by operator through ansible k8s module.
We're seeing this issue crop up in a customer cluster that we don't have full authority over, so a client-side fix in the ansible-operator would be a great improvement. I'll look at emulating the helm fix for the ansible-operator. My first guess on where to fix this is here in proxy.go.
Activity
jmrodri commentedon Mar 14, 2022
There is also a Red Hat bugzilla referencing this issue: https://bugzilla.redhat.com/show_bug.cgi?id=2063774
jmrodri commentedon Mar 14, 2022
Related kube issue: kubernetes/kubernetes#108657
jmrodri commentedon Mar 14, 2022
I've assigned @theishshah and @asmacdo as they are looking at the downstream related downstream bug.
subrnath commentedon Mar 29, 2022
After upgrading the metric-server image to latest 0.6, problem is fixed.
As per https://github.com/kubernetes-sigs/metrics-server
0.6.x metrics.k8s.io/v1beta1 1.19+
0.5.x metrics.k8s.io/v1beta1 *1.8+
0.4.x metrics.k8s.io/v1beta1 *1.8+
0.3.x metrics.k8s.io/v1beta1 1.8-1.21
We were using the image 0.3 which was not compatible with K8s 1.23.
gabe-l-hart commentedon Dec 15, 2022
We're seeing this issue crop up in a customer cluster that we don't have full authority over, so a client-side fix in the
ansible-operatorwould be a great improvement. I'll look at emulating the helm fix for theansible-operator. My first guess on where to fix this is here inproxy.go.Handle GroupDiscoveryFailedError in proxy.go (operator-framework#5596)
ansible: Handle GroupDiscoveryFailedError in proxy.go (operator-frame…
ansible: Add changelog fragment