kubernetes failed to start sandbox

在k8s集群中遇到一个节点上的Pod始终无法启动,状态为ContainerCreating,原因是节点内存buffer/cache占满导致Sandbox创建失败。解决办法是在/etc/sysctl.conf文件中添加'vm.zone_reclaim_mode = 1',然后执行'sysctl -p',这将使内核在内存不足时回收buffer/cache,问题解决后,Pod状态变为Running。
摘要由CSDN通过智能技术生成

k8s集群中有一个节点创建的pod总是起不来,状态一直是ContainerCreating,describe pod发现sandbox一直创建不起来

kubectl describe pod  xxxxx -n xxx

如下:

 Normal   SandboxChanged          22m (x90 over 32m)  kubelet, node4     Pod sandbox changed, it will be killed and re-created. 
 Warning  FailedCreatePodSandBox  32m (x7 over 32m)   kubelet, node4     Failed create pod sandbox.
 Warning  FailedSync              27m (x48 over 32m)  kubelet, node4     Error syncing pod

 登录节点查看节点日志:

tail -f /var/log/messages

日志输出如下,从日志中可以看出是节点内存的buffer/cache满了导致sandbox无法创建。

Jan 25 15:12:52 node4 kubelet: W0125 15:12:52.446651   20224 cni.go:265] CNI failed to retrieve network namespace path: Cannot find network namespace for the terminated container "a722b111fe3a8e78d1d7ee49280ab743d80c6e6ba955195b65bcfe60d5cf3264"
Jan 25 15:12:53 node4 docker: time="2019-01-25T15:12:53.102069754+08:00" level=error msg="Handler for POST /v1.26/containers/a722b111fe3a8e78d1d7ee49280ab743d80c6e6ba955195b65bcfe60d5cf3264/stop returned error: Container a722b111fe3a8e78d1d7ee49280ab743d80c6e6ba955195b65bcfe60d5cf3264 is already stopped"
Jan 25 15:12:53 node4 kernel: runc:[1:CHILD]: page allocation failure: order:6, mode:0x10c0d0
Jan 25 15:12:53 node4 kernel: CPU: 2 PID: 26598 Comm: runc:[1:CHILD] Tainted: G               ---------
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值