首页 > 其他分享 >kubernetes记录一起因为磁盘容量不足造成pod无线驱逐pod状态为Evicted

kubernetes记录一起因为磁盘容量不足造成pod无线驱逐pod状态为Evicted

时间:2024-08-12 15:41:11浏览次数:14  
标签:xxxx kubernetes deploy fxxx 86684b76ff 10.10 pod Evicted

线上的pod遭到无线的驱逐

fxxx-xxxx-deploy-86684b76ff-2vkdx          0/1     Evicted   0          30m     <none>         10.10.10.10   <none>           <none>
fxxx-xxxx-deploy-86684b76ff-5j6fd          0/1     Evicted   0          30m     <none>         10.10.10.10   <none>           <none>
fxxx-xxxx-deploy-86684b76ff-5tlcs          0/1     Evicted   0          30m     <none>         10.10.10.10   <none>           <none>
fxxx-xxxx-deploy-86684b76ff-69qsp          0/1     Evicted   0          30m     <none>         10.10.10.10   <none>           <none>
fxxx-xxxx-deploy-86684b76ff-7d5d5          0/1     Evicted   0          30m     <none>         10.10.10.10   <none>           <none>
fxxx-xxxx-deploy-86684b76ff-897xm          0/1     Evicted   0          30m     <none>         10.10.10.10   <none>           <none>
fxxx-xxxx-deploy-86684b76ff-8qnbt          0/1     Evicted   0          6d17h   <none>         10.10.10.10   <none>           <none>
fxxx-xxxx-deploy-86684b76ff-8s2h2          0/1     Evicted   0          30m     <none>         10.10.10.10   <none>           <none>
fxxx-xxxx-deploy-86684b76ff-9g72f          0/1     Evicted   0          30m     <none>         10.10.10.10   <none>           <none>
fxxx-xxxx-deploy-86684b76ff-dhpq8          0/1     Evicted   0          30m     <none>         10.10.10.10   <none>           <none>
fxxx-xxxx-deploy-86684b76ff-djb2b          0/1     Evicted   0          30m     <none>         10.10.10.10   <none>           <none>
fxxx-xxxx-deploy-86684b76ff-drn5c          0/1     Evicted   0          30m     <none>         10.10.10.10   <none>           <none>
fxxx-xxxx-deploy-86684b76ff-gxvht          0/1     Evicted   0          30m     <none>         10.10.10.10   <none>           <none>
fxxx-xxxx-deploy-86684b76ff-h25xv          0/1     Evicted   0          30m     <none>         10.10.10.10   <none>           <none>
fxxx-xxxx-deploy-86684b76ff-hknlz          0/1     Evicted   0          30m     <none>         10.10.10.10   <none>           <none>
fxxx-xxxx-deploy-86684b76ff-ltddg          0/1     Evicted   0          30m     <none>         10.10.10.10   <none>           <none>
fxxx-xxxx-deploy-86684b76ff-mxtl9          0/1     Evicted   0          30m     <none>         10.10.10.10   <none>           <none>
fxxx-xxxx-deploy-86684b76ff-nd6pd          0/1     Evicted   0          30m     <none>         10.10.10.10   <none>           <none>
fxxx-xxxx-deploy-86684b76ff-nn776          0/1     Evicted   0          30m     <none>         10.10.10.10   <none>           <none>
fxxx-xxxx-deploy-86684b76ff-pjkk2          0/1     Evicted   0          30m     <none>         10.10.10.10   <none>           <none>
fxxx-xxxx-deploy-86684b76ff-pxbx7          0/1     Evicted   0          30m     <none>         10.10.10.10   <none>           <none>
fxxx-xxxx-deploy-86684b76ff-qmh2d          0/1     Evicted   0          30m     <none>         10.10.10.10   <none>           <none>
fxxx-xxxx-deploy-86684b76ff-qq42q          0/1     Evicted   0          30m     <none>         10.10.10.10   <none>           <none>
fxxx-xxxx-deploy-86684b76ff-rt25l          0/1     Evicted   0          30m     <none>         10.10.10.10   <none>           <none>
fxxx-xxxx-deploy-86684b76ff-vbb7c          0/1     Evicted   0          30m     <none>         10.10.10.10   <none>           <none>
fxxx-xxxx-deploy-86684b76ff-vzc4v          0/1     Evicted   0          30m     <none>         10.10.10.10   <none>           <none>
fxxx-xxxx-deploy-86684b76ff-wcp8m          0/1     Evicted   0          30m     <none>         10.10.10.10   <none>           <none>
fxxx-xxxx-deploy-86684b76ff-whs28          0/1     Evicted   0          30m     <none>         10.10.10.10   <none>           <none>
fxxx-xxxx-deploy-86684b76ff-xqkjn          0/1     Evicted   0          30m     <none>         10.10.10.10   <none>           <none>

查看event事件报错

[root@centos ~]# kubectl get event -A
itsm          <unknown>   Normal    Scheduled             pod/fxxx-xxxx-deploy-86684b76ff-pxbx7    Successfully assigned itsm/fxxx-xxxx-deploy-86684b7
6ff-pxbx7 to 10.10.10.10
itsm          4h8m        Warning   Evicted               pod/fxxx-xxxx-deploy-86684b76ff-pxbx7    The node had condition: [DiskPressure].
itsm          <unknown>   Normal    Scheduled             pod/fxxx-xxxx-deploy-86684b76ff-qmh2d    Successfully assigned itsm/fxxx-xxxx-deploy-86684b7
6ff-qmh2d to 10.10.10.10
itsm          4h8m        Warning   Evicted               pod/fxxx-xxxx-deploy-86684b76ff-qmh2d    The node had condition: [DiskPressure].
itsm          <unknown>   Normal    Scheduled             pod/fxxx-xxxx-deploy-86684b76ff-qq42q    Successfully assigned itsm/fxxx-xxxx-deploy-86684b7
6ff-qq42q to 10.10.10.10
itsm          4h8m        Warning   Evicted               pod/fxxx-xxxx-deploy-86684b76ff-qq42q    The node had condition: [DiskPressure].
itsm          <unknown>   Normal    Scheduled             pod/fxxx-xxxx-deploy-86684b76ff-rt25l    Successfully assigned itsm/fxxx-xxxx-deploy-86684b7
6ff-rt25l to 10.10.10.10
itsm          4h8m        Warning   Evicted               pod/fxxx-xxxx-deploy-86684b76ff-rt25l    The node had condition: [DiskPressure].
itsm          <unknown>   Normal    Scheduled             pod/fxxx-xxxx-deploy-86684b76ff-vbb7c    Successfully assigned itsm/fxxx-xxxx-deploy-86684b7
6ff-vbb7c to 10.10.10.10
itsm          4h8m        Warning   Evicted               pod/fxxx-xxxx-deploy-86684b76ff-vbb7c    The node had condition: [DiskPressure].
itsm          <unknown>   Normal    Scheduled             pod/fxxx-xxxx-deploy-86684b76ff-vzc4v    Successfully assigned itsm/fxxx-xxxx-deploy-86684b7
6ff-vzc4v to 10.10.10.10
itsm          4h8m        Warning   Evicted               pod/fxxx-xxxx-deploy-86684b76ff-vzc4v    The node had condition: [DiskPressure].
itsm          <unknown>   Normal    Scheduled             pod/fxxx-xxxx-deploy-86684b76ff-wcp8m    Successfully assigned itsm/fxxx-xxxx-deploy-86684b7
6ff-wcp8m to 10.10.10.10
itsm          4h8m        Warning   Evicted               pod/fxxx-xxxx-deploy-86684b76ff-wcp8m    The node had condition: [DiskPressure].
itsm          <unknown>   Normal    Scheduled             pod/fxxx-xxxx-deploy-86684b76ff-whs28    Successfully assigned itsm/fxxx-xxxx-deploy-86684b7
6ff-whs28 to 10.10.10.10
itsm          4h8m        Warning   Evicted               pod/fxxx-xxxx-deploy-86684b76ff-whs28    The node had condition: [DiskPressure].
itsm          <unknown>   Normal    Scheduled             pod/fxxx-xxxx-deploy-86684b76ff-xqkjn    Successfully assigned itsm/fxxx-xxxx-deploy-86684b7
6ff-xqkjn to 10.10.10.10

查看10.10.10.10的node节点数据都是提示磁盘空间释放失败

[root@centos ~]# kubectl describe node 10.10.10.10
省略xxx信息
Allocated resources:
  (Total limits may be over 100 percent, i.e., overcommitted.)
  Resource           Requests       Limits
  --------           --------       ------
  cpu                5700m (71%)    5850m (73%)
  memory             25338Mi (79%)  28560Mi (89%)
  ephemeral-storage  0 (0%)         0 (0%)
Events:
  Type     Reason               Age                     From                     Message
  ----     ------               ----                    ----                     -------
  Warning  FreeDiskSpaceFailed  4h10m (x352 over 313d)  kubelet, 10.10.10.10  (combined from similar events): failed to garbage collect required amount of images
. Wanted to free 2599863091 bytes, but freed 0 bytes
  Warning  ImageGCFailed        3h10m (x359 over 313d)  kubelet, 10.10.10.10  (combined from similar events): failed to garbage collect required amount of images
. Wanted to free 2167268147 bytes, but freed 0 bytes

最终是清理了10.10.10.10的node节点的日志释放掉部分空间让pod启动成功,由于系统盘只有50G因为历史原因所以扩容集群把docker的数据目录迁移到新磁盘上面

[root@VM_10_10_centos ~]# df -h
Filesystem       Size  Used Avail Use% Mounted on
devtmpfs          16G     0   16G   0% /dev
tmpfs             16G   24K   16G   1% /dev/shm
tmpfs             16G  1.8M   16G   1% /run
tmpfs             16G     0   16G   0% /sys/fs/cgroup
/dev/vda1         50G   38G  9.6G  80% /
tmpfs             16G   12K   16G   1% /var/lib/kubelet/pods/ae0fb419-1f77-4707-bd44-d3d732706591/volumes/kubernetes.io~secret/tke-bridge-agent-token-5ncbf
tmpfs             16G   12K   16G   1% /var/lib/kubelet/pods/71c2fe89-200f-4c83-8731-cd6b1ca33597/volumes/kubernetes.io~secret/default-token-96wzl
tmpfs             16G   12K   16G   1% /var/lib/kubelet/pods/44dcc11f-8f18-4540-a4e9-fefc2a70a2e0/volumes/kubernetes.io~secret/kube-proxy-token-nst9k
tmpfs             16G   12K   16G   1% /var/lib/kubelet/pods/81819a9a-d4d7-4f34-8de2-2edf9774828a/volumes/kubernetes.io~secret/default-token-96wzl
省略.......................
[root@VM_248_116_centos ~]# du -sh /var/lib/docker
13G  /var/lib/docker

 

标签:xxxx,kubernetes,deploy,fxxx,86684b76ff,10.10,pod,Evicted
From: https://www.cnblogs.com/yeyouqing/p/18355069

相关文章

  • Kubernetes-二进制高可用部署v1.23.x
    目录高可用架构k8s集群组件ectdkube-apiserverkube-schedulerkube-controller-managerkubeletkube-proxykubectl高可用分析负载均衡节点设计1.环境准备1.1环境规划1.2所有节点配置host解析1.3安装必备工具1.4所有节点关闭防火墙、selinux、dnsmasq、swap1.5Master01节点免密......
  • 从零开始:Kubernetes 集群的搭建与配置指南,超详细,保姆级教程
    从零开始搭建Kubernetes集群从零开始搭建Kubernetes(K8s)集群部署方式准备工作(所有节点)1.关闭防火墙2.关闭SELinux3.关闭Swap分区4.设置主机名5.配置网络设置6.安装IPVS(可选,非必须)安装Docker、kubeadm、kubelet和kubectl1.安装Docker2.安装cri-docke......
  • Kubernetes-Init容器与静态Pod
    目录Init容器什么是Init容器?理解init容器Init容器与普通容器的不同之处静态Pod通过配置文件创建Init容器在Pod的生命周期中,可以执行多种操作如下图:什么是Init容器?Init容器也就是我们平时常说的初始化容器。InitContainer就是用来做初始化工作的容器,可以是一个或者多个,如果有......
  • kubernetes-POD的基本原理
    目录什么是POD?POD有以下特点:为什么使用POD作为最小单元,而不是container为什么允许一个POD里有多个容器POD中如何管理多个容器POD的yaml格式定义配置文件说明如何使用PodPOD的持久性和终止Pause我们首先在节点上运行一个pause容器然后再运行一个nginx容器,nginx将为localhost:2368......
  • CertBot搭配DNSPod
    CertBot搭配DNSPodsummary:cetbot搭配dnspod实现自动注册ssl证书和自动续期......
  • 【云原生之kubernetes实战】在k8s环境下部署Note Mark笔记工具
    【云原生之kubernetes实战】在k8s环境下部署NoteMark笔记工具一、NoteMark介绍1.1NoteMark简介1.2NoteMark特点1.3NoteMark使用场景二、本次实践介绍2.1本次实践简介2.2本次环境规划2.2k8s存储介绍三、检查k8s环境3.1检查工作节点状态3......
  • 【K8s】专题九:Kubernetes 常用命令汇总
    以下内容均来自个人笔记并重新梳理,如有错误欢迎指正!如果对您有帮助,烦请点赞、关注、订阅、转发!欢迎扫码关注个人公众号!目录写在前边一、集群相关1、查看集群信息2、查看集群服务3、查看集群组件4、查看集群版本5、查看集群API版本二、节点相关1、查看节点状态2......
  • Kubernetes-POD的健康检查
    目录简介什么是探针LivenessProbe(存活探针)ReadinessProbe(就绪探针)StartupProbe(启动探针)什么时候使用探针?何时使用存活探针(LivenessProbe)何时使用就绪探针(Read inessProbe)何时使用启动探针(StartupProbe)容器探测方法exechttpGettcpSocket容器探测使用livenessProbe使用exec使......
  • Kubernetes-POD的健康检查
    目录简介什么时候使用探针?何时使用存活探针(LivenessProbe)何时使用就绪探针(Read inessProbe)何时使用启动探针(StartupProbe)容器探测方法exechttpGettcpSocket容器探测使用livenessProbe使用exec使用httpGet使用tcpSocketreadinessProbe使用exec使用httpGet使用tcpSocket使用start......
  • 【Kubernetes】k8s集群存储卷(pvc存储卷)
    目录一.pvc存储卷1.PV2.PVC3.StorageClass4.PV和PVC的生命周期二.实战演练1.创建静态pv1.1.配置nfs1.2.创建pv1.3.创建pvc1.4.结合pod,将pv、pvc一起运行2.创建动态pv2.1.上传2.2.创建ServiceAccount,用来管理NFSProvisioner在k8s集群中运行的权限,设置nfs-......