问题:
在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
阅读(7231) | 评论(0) | 转发(0) |