2

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
  • 312
  • 3
  • 10
  • If you’re getting `CrashLoopBackOff` then the image successfully pulled and it’s not starting up (or exiting). Without knowing more details of the image (like its Dockerfile and the Kubernetes Deployment spec) or the `kubectl logs` output of the failing pod it’s going to be really hard to say more. – David Maze Dec 10 '18 at 15:42
  • @DavidMaze I add the event logs that i got from describe pods commad – MOBT Dec 10 '18 at 15:56
  • `kubectl logs --previous xxx` on that pod – Ho Man Dec 10 '18 at 19:18
  • @HoMan kubectl logs --previous xxx shows "the server doesn't have a resource type "xxx" " – MOBT Dec 10 '18 at 19:38
  • .. you should put in the pod name. e.g. `kubectl logs --previous dummy-ser-5459bf444d-9b7sz` – Ho Man Dec 10 '18 at 20:31
  • and add your `dummy.yaml` please – Nick Rak Dec 11 '18 at 10:04
  • @Nick Rak..Fixed, the problem was the image not support ARM7 because I built the image in Ubuntu 64. – MOBT Dec 11 '18 at 17:50

1 Answers1

2

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
  • 312
  • 3
  • 10