我正在使用 kubernetes 集群使用 kubectl create -f dummy.yaml 部署图像。我的图像在 docker hub 中是公开的,图像大小为 1.3 GB。图像拉取成功但没有运行它是“CrashLoopBackOff”。当我运行创建部署命令“kubectl create -f dummy.yaml”时,我得到:
Name READY STATUS RESTARTS AGE
dummy-ser-5459bf444d-9b7sz 0/1 CrashLoopBackOff 118 10h
我尝试
command: [ "/bin/bash", "-c", "--" ]
args: [ "while true; do sleep 30; done;" ]
在我的 yaml 文件中使用,它适用于 700 MB 的图像大小,但是当我将它与 1.3 GB 的其他图像一起使用时,它显示 CrashLoopBackOff,拉动后的容器似乎无法运行,因为图像成功拉动。
描述 pod 显示:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 12m default-scheduler Successfully assigned dummy-ser-779 7db4cd4-djqdz to node02
Normal SuccessfulMountVolume 12m kubelet, node02 MountVolume.SetUp succeeded for vol ume "default-token-8p9lq"
Normal Created 1m (x4 over 2m) kubelet, node02 Created container
Normal Started 1m (x4 over 2m) kubelet, node02 Started container
Warning BackOff 53s (x8 over 2m) kubelet, node02 Back-off restarting failed containe r
Normal Pulling 41s (x5 over 12m) kubelet, node02 pulling image "xxx/dummyenc:ba ni"
Normal Pulled 40s (x5 over 2m) kubelet, node02 Successfully pulled image "xxx
谢谢先进