相关文章推荐
自信的热水瓶  ·  Jupyter note ...·  2 月前    · 
坏坏的小狗  ·  Oracle GoldenGate 之 ...·  6 月前    · 
逆袭的大海  ·  httpclient ...·  1 年前    · 

1.pod报错:unable to ensure pod container exists: failed to create container for [kubepods burstable pod7e45f702-c697-4b39-b34b-db8792445622] : mkdir /sys/fs/cgroup/memory/kubepods/burstable/pod7e45f702-c697-4b39-b34b-db8792445622: cannot allocate memory

首先查看node情况是不是内存不足kubectl describe nodes kubernetes-dev-worker-6,看到空闲内存很多。

然后看是否是内存泄漏,但是用的kubelet已经是重新编译过的与其他节点的md5sum是一样的,所以不应该是内存泄漏问题,然后journalctl -u kubelet -r看到kubelet很多报错

RunPodSandbox from runtime service failed: rpc error: code = Unknown desc = failed to start sandbox container fo
Mar 04 11:14:27 kubernetes-dev-worker-6 kubelet[136443]: W0304 11:14:27.076560 136443 pod_container_deletor.go:79] Container "e2806f6ebf408a007859f2b0a437553a06e34672adc2b8519bcc24f2765eb039" not found in pod's containers
Mar 04 11:14:26 kubernetes-dev-worker-6 kubelet[136443]: E0304 11:14:26.279431 136443 pod_workers.go:191] Error syncing pod c5f026dc-46f8-4188-b607-209d9ae767d0 ("baktaskjob-1709425020-7v7tc_ipd-dev(c5f026dc-46f8-4188-b60

尝试重启kubelet无效,之后查看docker日志journalctl -u docker 也都是报错

level=error msg="stream copy error: reading from a closed fifo"
Dec 04 07:04:40 kubernetes-dev-worker-6 dockerd[246402]: time="2023-12-04T07:04:40.527231567+08:00" level=error msg="stream copy error: reading from a closed fifo"
Dec 04 07:04:40 kubernetes-dev-worker-6 dockerd[246402]: time="2023-12-04T07:04:40.529487983+08:00" level=error msg="Error running exec 12d6951eaa00993f9478bec87a9eac4252bcfbad3ea2717776321ae609a51315 in container: OCI run
Dec 04 07:04:50 kubernetes-dev-worker-6 dockerd[246402]: time="2023-12-04T07:04:50.535993015+08:00" level=error msg="stream copy error: reading from a closed fifo"
Dec 04 07:04:50 kubernetes-dev-worker-6 dockerd[246402]: time="2023-12-04T07:04:50.535993948+08:00" level=error msg="stream copy error: reading from a closed fifo"
Dec 04 07:04:50 kubernetes-dev-worker-6 dockerd[246402]: time="2023-12-04T07:04:50.538509730+08:00" level=error msg="Error running exec ccd132ce947992fa08634781dab1217fef2ffd556ab29ba4f770f246c0aad978 in container: OCI run
Dec 04 07:05:00 kubernetes-dev-worker-6 dockerd[246402]: time="2023-12-04T07:05:00.527944925+08:00" level=error msg="stream copy error: reading from a closed fifo"

尝试重启docker 内存不能分配问题解决