Unable to determine if virtual resource(unable to retrieve the complete list of server APIs)问题解决

日志

{
"level": "error",
"ts": 1665832173.374363,
"logger": "proxy",
"msg": "Unable to determine if virtual resource",
"gvk": "/v1, Kind=Secret",
"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:2916\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1966"
}

在下面的日志找了一些解决办法

https://github.com/kiali/kiali/issues/3239

https://github.com/helm/helm/issues/6361#issuecomment-538220109

有下面的操作,可以尝试是否可以解决

┌──[root@vms81.liruilongs.github.io]-[~/awx/awx-operator]
└─$kubectl get apiservice
NAME                                   SERVICE                      AVAILABLE                  AGE
v1.                                    Local                        True                       306d
v1.admissionregistration.k8s.io        Local                        True                       306d
v1.apiextensions.k8s.io                Local                        True                       306d
v1.apps                                Local                        True                       306d
v1.authentication.k8s.io               Local                        True                       306d
v1.authorization.k8s.io                Local                        True                       306d
v1.autoscaling                         Local                        True                       306d
v1.batch                               Local                        True                       306d
v1.certificates.k8s.io                 Local                        True                       306d
v1.coordination.k8s.io                 Local                        True                       306d
v1.crd.projectcalico.org               Local                        True                       47h
v1.discovery.k8s.io                    Local                        True                       306d
v1.events.k8s.io                       Local                        True                       306d
v1.monitoring.coreos.com               Local                        True                       47h
v1.networking.k8s.io                   Local                        True                       306d
v1.node.k8s.io                         Local                        True                       306d
v1.policy                              Local                        True                       306d
v1.rbac.authorization.k8s.io           Local                        True                       306d
v1.scheduling.k8s.io                   Local                        True                       306d
v1.storage.k8s.io                      Local                        True                       306d
v1alpha1.monitoring.coreos.com         Local                        True                       47h
v1beta1.awx.ansible.com                Local                        True                       47h
v1beta1.batch                          Local                        True                       306d
v1beta1.discovery.k8s.io               Local                        True                       306d
v1beta1.events.k8s.io                  Local                        True                       306d
v1beta1.flowcontrol.apiserver.k8s.io   Local                        True                       306d
v1beta1.metrics.k8s.io                 kube-system/metrics-server   False (MissingEndpoints)   306d
v1beta1.node.k8s.io                    Local                        True                       306d
v1beta1.policy                         Local                        True                       306d
v1beta1.storage.k8s.io                 Local                        True                       306d
v2beta1.autoscaling                    Local                        True                       306d
v2beta2.autoscaling                    Local                        True                       306d
┌──[root@vms81.liruilongs.github.io]-[~/awx/awx-operator]
└─$kubectl delete apiservice v1beta1.metrics.k8s.io
apiservice.apiregistration.k8s.io "v1beta1.metrics.k8s.io" deleted
┌──[root@vms81.liruilongs.github.io]-[~/awx/awx-operator]
└─$kubectl get apiservice
NAME                                   SERVICE   AVAILABLE   AGE
v1.                                    Local     True        306d
v1.admissionregistration.k8s.io        Local     True        306d
v1.apiextensions.k8s.io                Local     True        306d
v1.apps                                Local     True        306d
v1.authentication.k8s.io               Local     True        306d
v1.authorization.k8s.io                Local     True        306d
v1.autoscaling                         Local     True        306d
v1.batch                               Local     True        306d
v1.certificates.k8s.io                 Local     True        306d
v1.coordination.k8s.io                 Local     True        306d
v1.crd.projectcalico.org               Local     True        47h
v1.discovery.k8s.io                    Local     True        306d
v1.events.k8s.io                       Local     True        306d
v1.monitoring.coreos.com               Local     True        47h
v1.networking.k8s.io                   Local     True        306d
v1.node.k8s.io                         Local     True        306d
v1.policy                              Local     True        306d
v1.rbac.authorization.k8s.io           Local     True        306d
v1.scheduling.k8s.io                   Local     True        306d
v1.storage.k8s.io                      Local     True        306d
v1alpha1.monitoring.coreos.com         Local     True        47h
v1beta1.awx.ansible.com                Local     True        47h
v1beta1.batch                          Local     True        306d
v1beta1.discovery.k8s.io               Local     True        306d
v1beta1.events.k8s.io                  Local     True        306d
v1beta1.flowcontrol.apiserver.k8s.io   Local     True        306d
v1beta1.node.k8s.io                    Local     True        306d
v1beta1.policy                         Local     True        306d
v1beta1.storage.k8s.io                 Local     True        306d
v2beta1.autoscaling                    Local     True        306d
v2beta2.autoscaling                    Local     True        306d
┌──[root@vms81.liruilongs.github.io]-[~/awx/awx-operator]
└─$
posted @ 2022-10-15 21:12  山河已无恙  阅读(412)  评论(0编辑  收藏  举报