Chinaunix首页 | 论坛 | 博客
  • 博客访问: 413328
  • 博文数量: 49
  • 博客积分: 2562
  • 博客等级: 少校
  • 技术积分: 417
  • 用 户 组: 普通用户
  • 注册时间: 2005-11-03 09:10
个人简介

时不我待。

文章分类

全部博文(49)

文章存档

2024年(1)

2020年(3)

2013年(1)

2012年(5)

2011年(9)

2010年(4)

2009年(9)

2008年(15)

2005年(2)

分类: 虚拟化

2024-05-28 12:54:03

问题:

在k8s下执行"kubectl get pod "时,报一下错误:



点击(此处)折叠或打开

  1. [root@app1 ~]kubectl get pod
  2. 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
  3. 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
  4. 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
  5. 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过程导致,通过以下命令查看问题原因: 


点击(此处)折叠或打开

  1. [root@app1 ~]# kubectl describe apiservice v1alpha1.cert-manager.io
  2. 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
  3. 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
  4. 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
  5. 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
  6. Name: v1alpha1.cert-manager.io
  7. Namespace:
  8. Labels: app=cert-manager-webhook-dnspod
  9.               app.kubernetes.io/managed-by=Helm
  10.               chart=cert-manager-webhook-dnspod-0.3.3
  11.               heritage=Helm
  12.               release=cert-manager-webhook-dnspod
  13. Annotations: cert-manager.io/inject-ca-from: cert-manager/cert-manager-webhook-dnspod-webhook-tls
  14.               meta.helm.sh/release-name: cert-manager-webhook-dnspod
  15.               meta.helm.sh/release-namespace: cert-manager
  16. API Version: apiregistration.k8s.io/v1
  17. Kind: APIService
  18. Metadata:
  19.   Creation Timestamp: 2023-07-14T02:18:21Z
  20.   Managed Fields:
  21.     API Version: apiregistration.k8s.io/v1
  22.     Fields Type: FieldsV1
  23.     fieldsV1:
  24. …………

  25.   Service:
  26.     Name: cert-manager-webhook-dnspod
  27.     Namespace: cert-manager
  28.     Port: 443
  29.   Version: v1alpha1
  30.   Version Priority: 15
  31. Status:
  32.   Conditions:
  33.     Last Transition Time: 2024-01-24T02:00:32Z
  34.     Message: endpoints for service/cert-manager-webhook-dnspod in "cert-manager" have no addresses with port name "https"
  35.     Reason: MissingEndpoints
  36.     Status: False
  37.     Type: Available
  38. Events: <none>
cert-manager没有地址,导致此问题报错

查看endpint相关信息,缺少IP地址:

点击(此处)折叠或打开

  1. [root@app1 ~]# kubectl get endpoints -A|grep dns
  2. E0528 12:28:13.420696 187613 memcache.go:255] couldn't get resource list for cert-man
  3. cert-manager cert-manager-webhook-dnspod <none> 39m
  4. kube-system kube-dns 172.16.245.122:53,172.16.245.123:53,172.16.245.122:53 + 3 more... 452d

cert-manager在该平台中未使用,使用以下命令进行清查操作:

点击(此处)折叠或打开

  1. [root@app1 ~]# kubectl delete endpoints -n cert-manager cert-manager-webhook-dnspod
  2. 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
  3. 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
  4. 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
  5. 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
  6. endpoints "cert-manager-webhook-dnspod" deleted

再次查看,未发现系统报错,问题解决。

点击(此处)折叠或打开

  1. [root@app1 ~]# kubectl get pod
  2. NAME READY STATUS RESTARTS AGE
  3. sleep-577dfc8474-5rq54 1/1 Running 1 (3h58m ago) 125d
  4. spring-boot-helloworld-6985c7f8bb-rmd4h 1/1 Running 1 (3h58m ago) 125d



阅读(8943) | 评论(0) | 转发(0) |
0

上一篇:政策简单,有利执行

下一篇:没有了

给主人留下些什么吧!~~