deploying image in kubernetes cluster getting CrashLoopBackOff

12/10/2018

I am using kubernetes cluster to deploy an image using kubectl create -f dummy.yaml . my image is public in docker hub, the size of the image is 1.3 GB. the image pull successfully but it is not running it is " CrashLoopBackOff". when i run creation deployment command "kubectl create -f dummy.yaml" i got:

 Name                         READY     STATUS             RESTARTS   AGE
 dummy-ser-5459bf444d-9b7sz   0/1       CrashLoopBackOff   118        10h

I tried to used
command: [ "/bin/bash", "-c", "--" ] args: [ "while true; do sleep 30; done;" ] in my yaml file, it is work with image size 700 MB but it show CrashLoopBackOff when i use it with other image 1.3 GB, it seems the container after pulling cannot run because the image successful pulled.

The describe pods show :

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 

Thank you in advanced

-- MOBT
docker
dockerfile
kubernetes
kubernetes-cluster

1 Answer

12/11/2018

I fixed this problem. I got this error because the image was not compatible with the hardware that I tried to run on (ARM7)RPi. I create the image on ubuntu 64bit using docker build for Dockerfile so that image cannot run on Raspberry pi.

-- MOBT
Source: StackOverflow