kubectl get pod时 报错couldn\'t get resource list for cert-凯发app官方网站
在k8s下执行"kubectl get pod "时,报一下错误:
-
[root@app1 ~]# kubectl get pod
-
e0528 12:27:42.105135 187150 memcache.go:255] couldn't get resource list for cert-manager.io/v1alpha1: the server is currently unable to handle the request
-
e0528 12:27:42.106730 187150 memcache.go:106] couldn't get resource list for cert-manager.io/v1alpha1: the server is currently unable to handle the request
-
e0528 12:27:42.108499 187150 memcache.go:106] couldn't get resource list for cert-manager.io/v1alpha1: the server is currently unable to handle the request
-
e0528 12:27:42.111427 187150 memcache.go:106] couldn't get resource list for cert-manager.io/v1alpha1: the server is currently unable to handle the request
问题定位:
该问题由于kubectl 在访问apiservice过程导致,通过以下命令查看问题原因:
-
[root@app1 ~]# kubectl describe apiservice v1alpha1.cert-manager.io
-
e0528 12:25:53.708862 185582 memcache.go:255] couldn't get resource list for cert-manager.io/v1alpha1: the server is currently unable to handle the request
-
e0528 12:25:53.713279 185582 memcache.go:106] couldn't get resource list for cert-manager.io/v1alpha1: the server is currently unable to handle the request
-
e0528 12:25:53.715726 185582 memcache.go:106] couldn't get resource list for cert-manager.io/v1alpha1: the server is currently unable to handle the request
-
e0528 12:25:53.718525 185582 memcache.go:106] couldn't get resource list for cert-manager.io/v1alpha1: the server is currently unable to handle the request
-
name: v1alpha1.cert-manager.io
-
namespace:
-
labels: app=cert-manager-webhook-dnspod
-
app.kubernetes.io/managed-by=helm
-
chart=cert-manager-webhook-dnspod-0.3.3
-
heritage=helm
-
release=cert-manager-webhook-dnspod
-
annotations: cert-manager.io/inject-ca-from: cert-manager/cert-manager-webhook-dnspod-webhook-tls
-
meta.helm.sh/release-name: cert-manager-webhook-dnspod
-
meta.helm.sh/release-namespace: cert-manager
-
api version: apiregistration.k8s.io/v1
-
kind: apiservice
-
metadata:
-
creation timestamp: 2023-07-14t02:18:21z
-
managed fields:
-
api version: apiregistration.k8s.io/v1
-
fields type: fieldsv1
-
fieldsv1:
-
…………
-
-
service:
-
name: cert-manager-webhook-dnspod
-
namespace: cert-manager
-
port: 443
-
version: v1alpha1
-
version priority: 15
-
status:
-
conditions:
-
last transition time: 2024-01-24t02:00:32z
-
message: endpoints for service/cert-manager-webhook-dnspod in "cert-manager" have no addresses with port name "https"
-
reason: missingendpoints
-
status: false
-
type: available
-
events: <none>
cert-manager没有地址,导致此问题报错
查看endpint相关信息,缺少ip地址:
-
[root@app1 ~]# kubectl get endpoints -a|grep dns
-
e0528 12:28:13.420696 187613 memcache.go:255] couldn't get resource list for cert-man
-
cert-manager cert-manager-webhook-dnspod <none> 39m
-
kube-system kube-dns 172.16.245.122:53,172.16.245.123:53,172.16.245.122:53 3 more... 452d
-
cert-manager在该平台中未使用,使用以下命令进行清查操作:
-
[root@app1 ~]# kubectl delete endpoints -n cert-manager cert-manager-webhook-dnspod
-
e0528 12:28:58.992511 188344 memcache.go:255] couldn't get resource list for cert-manager.io/v1alpha1: the server is currently unable to handle the request
-
e0528 12:28:58.994115 188344 memcache.go:106] couldn't get resource list for cert-manager.io/v1alpha1: the server is currently unable to handle the request
-
e0528 12:28:58.996940 188344 memcache.go:106] couldn't get resource list for cert-manager.io/v1alpha1: the server is currently unable to handle the request
-
e0528 12:28:58.998950 188344 memcache.go:106] couldn't get resource list for cert-manager.io/v1alpha1: the server is currently unable to handle the request
-
endpoints "cert-manager-webhook-dnspod" deleted
再次查看,未发现系统报错,问题解决。
-
[root@app1 ~]# kubectl get pod
-
name ready status restarts age
-
sleep-577dfc8474-5rq54 1/1 running 1 (3h58m ago) 125d
-
spring-boot-helloworld-6985c7f8bb-rmd4h 1/1 running 1 (3h58m ago) 125d
阅读(353) | 评论(0) | 转发(0) |