-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
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. #108657
Comments
Helm fixed a similar issue helm/helm#6361 by helm/helm#6908. |
/triage accepted |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What happened?
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 happen?
No error when a k8s resource is created by operator through ansible k8s module.
name: Create Headless services
tags: deploy
k8s:
state: present
definition: "{{ lookup('template', 'app_services.j2') | from_yaml }}"
namespace: "{{ ansible_operator_meta.namespace }}"
How can we reproduce it (as minimally and precisely as possible)?
Deploy K8s 1.23.1
Deploy metrics server.
Run the ansible operator image from https://quay.io/repository/operator-framework/ansible-operator
Run any playbook from https://docs.ansible.com/ansible/2.9/modules/k8s_module.html which uses k8s module to access K8s API server.
Anything else we need to know?
No response
Kubernetes version
Install tools
Container runtime (CRI) and version (if applicable)
Related plugins (CNI, CSI, ...) and versions (if applicable)
/sig api-machinery
/wg api-expression
The text was updated successfully, but these errors were encountered: