本文介绍了推出后的kubernetes UnexpectedAdmissionError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一项服务无法回复某些HTTP请求,挖掘了它的日志,发现到达proxy服务时似乎出现了某种DNS故障

I had a service failing to reply to some HTTP requests, digging it's logs it seemed to be some sort of DNS failure on reaching a proxy service

'proxy' failed to resolve 'proxy.default.svc.cluster.local' after 2 queries

所以我找不到任何错误,然后尝试了kubectl rollout restart deployment/backend.紧接着这些出现在豆荚列表中:

So I could not find anything wrong and tried kubectl rollout restart deployment/backend.Just after that these appeared in the pods list:

backend-54769cbb4-xkwf2              0/1     UnexpectedAdmissionError   0          4h6m
backend-54769cbb4-xlpgf              0/1     UnexpectedAdmissionError   0          4h4m
backend-54769cbb4-xmnr5              0/1     UnexpectedAdmissionError   0          4h7m
backend-54769cbb4-xmq5n              0/1     UnexpectedAdmissionError   0          4h7m
backend-54769cbb4-xphrw              0/1     UnexpectedAdmissionError   0          4h5m
backend-54769cbb4-xrmrq              0/1     UnexpectedAdmissionError   0          4h1m
backend-54769cbb4-xrmw8              0/1     UnexpectedAdmissionError   0          4h6m
backend-54769cbb4-xt4ck              0/1     UnexpectedAdmissionError   0          4h4m
backend-54769cbb4-xws8r              0/1     UnexpectedAdmissionError   0          4h6m
backend-54769cbb4-xx6r4              0/1     UnexpectedAdmissionError   0          4h5m
backend-54769cbb4-xxpfd              0/1     UnexpectedAdmissionError   0          4h6m
backend-54769cbb4-xzjql              0/1     UnexpectedAdmissionError   0          4h4m
backend-54769cbb4-xzzlk              0/1     UnexpectedAdmissionError   0          4h7m
backend-54769cbb4-z46ms              0/1     UnexpectedAdmissionError   0          4h5m
backend-54769cbb4-z4sl7              0/1     UnexpectedAdmissionError   0          4h6m
backend-54769cbb4-z6jpj              0/1     UnexpectedAdmissionError   0          4h5m
backend-54769cbb4-z6ngq              0/1     UnexpectedAdmissionError   0          4h6m
backend-54769cbb4-z8w4h              0/1     UnexpectedAdmissionError   0          4h5m
backend-54769cbb4-z9jqb              0/1     UnexpectedAdmissionError   0          4h3m
backend-54769cbb4-zbvqm              0/1     UnexpectedAdmissionError   0          4h2m
backend-54769cbb4-zcfxg              0/1     UnexpectedAdmissionError   0          4h3m
backend-54769cbb4-zcvqm              0/1     UnexpectedAdmissionError   0          4h6m
backend-54769cbb4-zf2f8              0/1     UnexpectedAdmissionError   0          4h2m
backend-54769cbb4-zgnkh              0/1     UnexpectedAdmissionError   0          4h7m
backend-54769cbb4-zhdr8              0/1     UnexpectedAdmissionError   0          4h2m
backend-54769cbb4-zhx6g              0/1     UnexpectedAdmissionError   0          4h7m
backend-54769cbb4-zj8f2              0/1     UnexpectedAdmissionError   0          4h3m
backend-54769cbb4-zjbwp              0/1     UnexpectedAdmissionError   0          4h5m
backend-54769cbb4-zjc8g              0/1     UnexpectedAdmissionError   0          4h3m
backend-54769cbb4-zjdcp              0/1     UnexpectedAdmissionError   0          4h4m
backend-54769cbb4-zkcrb              0/1     UnexpectedAdmissionError   0          4h7m
backend-54769cbb4-zlpll              0/1     UnexpectedAdmissionError   0          4h2m
backend-54769cbb4-zm2cx              0/1     UnexpectedAdmissionError   0          4h6m
backend-54769cbb4-zn7mr              0/1     UnexpectedAdmissionError   0          4h6m
backend-54769cbb4-znjkp              0/1     UnexpectedAdmissionError   0          4h3m
backend-54769cbb4-zpnk7              0/1     UnexpectedAdmissionError   0          4h2m
backend-54769cbb4-zrrl7              0/1     UnexpectedAdmissionError   0          4h2m
backend-54769cbb4-zsdsz              0/1     UnexpectedAdmissionError   0          4h4m
backend-54769cbb4-ztdx8              0/1     UnexpectedAdmissionError   0          4h2m
backend-54769cbb4-ztln6              0/1     UnexpectedAdmissionError   0          4h2m
backend-54769cbb4-ztplg              0/1     UnexpectedAdmissionError   0          4h6m
backend-54769cbb4-ztzfh              0/1     UnexpectedAdmissionError   0          4h2m
backend-54769cbb4-zvb8g              0/1     UnexpectedAdmissionError   0          4h6m
backend-54769cbb4-zwsr8              0/1     UnexpectedAdmissionError   0          4h7m
backend-54769cbb4-zwvxr              0/1     UnexpectedAdmissionError   0          4h5m
backend-54769cbb4-zwx6h              0/1     UnexpectedAdmissionError   0          4h6m
backend-54769cbb4-zz4bf              0/1     UnexpectedAdmissionError   0          4h1m
backend-54769cbb4-zzq6t              0/1     UnexpectedAdmissionError   0          4h2m

(还有更多)

所以我又添加了两个节点,现在一切似乎都很好,除了这个大的Pod列表(处于错误状态,我不理解). UnexpectedAdmissionError是什么,我该怎么办?

So I added two more nodes, and now everything seems fine except for this big list of pods in an error state which I don't understand. What is this UnexpectedAdmissionError, and what should I do about it?

注意:这是一个DigitalOcean集群

Note: this is a DigitalOcean cluster

Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.3", GitCommit:"2d3c76f9091b6bec110a5e63777c332469e0cba2", GitTreeState:"clean", BuildDate:"2019-08-19T12:38:36Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.3", GitCommit:"2d3c76f9091b6bec110a5e63777c332469e0cba2", GitTreeState:"clean", BuildDate:"2019-08-19T11:05:50Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}

以下内容似乎很重要:kubectl describe one_failed_pod

The following seems important: kubectl describe one_failed_pod

Events:
  Type     Reason                    Age    From                    Message
  ----     ------                    ----   ----                    -------
  Normal   Scheduled                 2m51s  default-scheduler       Successfully assigned default/backend-549f576d5f-xzdv4 to std-16gb-g7mo
  Warning  UnexpectedAdmissionError  2m51s  kubelet, std-16gb-g7mo  Update plugin resources failed due to failed to write checkpoint file "kubelet_internal_checkpoint": write /var/lib/kubelet/device-plugins/.543592130: no space left on device, which is unexpected.

推荐答案

我遇到了同样的问题,同时描述了带有UnexpectedAdmissionError的Pod之一时,我看到了以下内容:

I had the same issue, while describing one of the pods with UnexpectedAdmissionError I saw the following:

由于无法写入deviceplugin检查点文件"kubelet_internal_checkpoint",导致更新插件资源失败:写入/var/lib/kubelet/device-plugins/.525608957:设备上没有剩余空间,这是意外的.

Update plugin resources failed due to failed to write deviceplugin checkpoint file "kubelet_internal_checkpoint": write /var/lib/kubelet/device-plugins/.525608957: no space left on device, which is unexpected.

在描述节点时:

OutOfDisk Unknown星期二,2020年6月30日14:07:04 -0400 Tue,2020年6月30日14:12:05 -0400 NodeStatusUnknown Kubelet停止发布节点状态.

OutOfDisk Unknown Tue, 30 Jun 2020 14:07:04 -0400 Tue, 30 Jun 2020 14:12:05 -0400 NodeStatusUnknown Kubelet stopped posting node status.

我通过重新启动节点来解决了这个问题

I resolved this by rebooting node

这篇关于推出后的kubernetes UnexpectedAdmissionError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 20:31