<p>I have a working docker image which I am trying to now use on Kubernetes but as I try to run the deployment it never runs. It gets stuck in a crash loop error and I have no way of working out what the logs say because it exits so quickly. I've included my deployment yaml file to see if there is something obviously wrong. </p>

<p>Any help is appreciated.</p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  name: newapp
  labels:
    app: newapp
spec:
  ports:
    - port: 80
  selector:
    app: newapp
    tier: frontend
  type: LoadBalancer
---
apiVersion: apps/v1beta2 # for versions before 1.8.0 use apps/v1beta1
kind: Deployment
metadata:
  name: newapp
  labels:
    app: newapp
spec:
  selector:
    matchLabels:
      app: newapp
      tier: frontend
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: newapp
        tier: frontend
    spec:
      containers:
      - image: customwebimage
        name: newapp
        envFrom:
          - configMapRef:
              name: newapp-config
        ports:
        - containerPort: 80
      imagePullSecrets:
      - name: test123
</code></pre>

Rutnet
<p>You can view the previous logs by adding <code>-p</code></p>

<p><code>kubectl logs -p pod-name</code></p>

<p>I'd delete the Deployments Pod and try this with a new Pod, which will run 5 times before entering CrashLoopBackoff.</p>

<p>If the error isn't happening during container runtime, then you can describe the pod to see for scheduling / instantiation errors:</p>

<p><code>kubectl describe pod pod-name</code></p>
