kubernetes pod CrashLoopBackOff

3/10/2018

The server have those docker images.the red is pulled from repository,the yellow were modified by myself,and then commit

now,i use the images which pulled from repository to create pod,it's no error,and running. apiVersion: v1 kind: ReplicationController metadata: name: sds spec: replicas: 1 selector: app: sds template: metadata: labels: app: sds spec: containers: - name: sds imagePullPolicy: IfNotPresent image: tomcat ports: - containerPort: 8080 the red pod

but if I use the images which I modified to create pod,it's crachLoopBackOff.

apiVersion: v1 kind: ReplicationController metadata: name: sds spec: replicas: 1 selector: app: sds template: metadata: labels: app: sds spec: containers: - name: sds imagePullPolicy: IfNotPresent image: mytomcat ports: - containerPort: 8080 the red one

I use kubectl logs [podname],but show nothing enter image description here i use kubectl describe pod [podName] show the describe of this pod ! the describe of the error pod

-- kuber
kubectl
kubernetes
kubernetes-pod

1 Answer

3/10/2018

A CrashLoopBackOff can have different causes: - your container finishes very quickly and since you have 1 replica, Kubernetes restarts it again and again.... - your container doesn't have correct permissions on a volume

It depends on what kind of changes you made on your docker image.

-- Nicola Ben
Source: StackOverflow