<p>I have been playing around with minikube and after a set of operations, the output of <code>kubectl get pod -w</code> is like this-</p>

<pre><code>
nginx   1/1   Running   2     10m
nginx   1/1   Running   3     10m
nginx   0/1   Completed   2     10m
nginx   0/1   CrashLoopBackOff   2     11m
nginx   1/1   Running   3     11m
nginx   1/1   Running   3     12m
</code></pre>

<p>I don't understand the count shown at line 3 and 4. What does restart count convey exactly?</p>

<h3>About the <code>CrashLoopBackOff</code> Status:</h3>

<p>A <code>CrashloopBackOff</code> means that you have a pod starting, crashing, starting again, and then crashing again.</p>

<p>Failed containers that are restarted by the kubelet are restarted with an exponential back-off delay (10s, 20s, 40s …) capped at five minutes, and is reset after ten minutes of successful execution.</p>

<p><code>CrashLoopBackOff</code> events occurs for different reasons, most of te cases related to the following:
- The application inside the container keeps crashing
- Some parameter of the pod or container have been configured incorrectly
- An error made during the deployment </p>

<p>Whenever you face a <code>CrashLoopBackOff</code> do a <code>kubectl describe</code> to investigate:</p>

<p><code>kubectl describe pod POD_NAME --namespace NAMESPACE_NAME</code> </p>

<pre><code>user@minikube:~$ kubectl describe pod ubuntu-5d4bb4fd84-8gl67 --namespace default
Name:         ubuntu-5d4bb4fd84-8gl67
Namespace:    default
Priority:     0
Node:         minikube/192.168.39.216
Start Time:   Thu, 09 Jan 2020 09:51:03 +0000
Labels:       app=ubuntu
              pod-template-hash=5d4bb4fd84
Status:       Running
Controlled By:  ReplicaSet/ubuntu-5d4bb4fd84
Containers:
  ubuntu:
    Container ID:   docker://c4c0295e1e050b5e395fc7b368a8170f863159879821dd2562bc2938d17fc6fc
    Image:          ubuntu
    Image ID:       docker-pullable://ubuntu@sha256:250cc6f3f3ffc5cdaa9d8f4946ac79821aafb4d3afc93928f0de9336eba21aa4
    State:          Terminated
      Reason:       Completed
      Exit Code:    0
      Started:      Thu, 09 Jan 2020 09:54:37 +0000
      Finished:     Thu, 09 Jan 2020 09:54:37 +0000
    Last State:     Terminated
      Reason:       Completed
      Exit Code:    0
      Started:      Thu, 09 Jan 2020 09:53:05 +0000
      Finished:     Thu, 09 Jan 2020 09:53:05 +0000
    Ready:          False
    Restart Count:  5
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-xxxst (ro)
Conditions:
  Type              Status
  Initialized       True 
  Ready             False 
  ContainersReady   False 
  PodScheduled      True 
Volumes:
  default-token-xxxst:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-xxxst
    Optional:    false
QoS Class:       BestEffort
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type     Reason     Age                    From               Message
  ----     ------     ----                   ----               -------
  Normal   Scheduled  7m16s                  default-scheduler  Successfully assigned default/ubuntu-5d4bb4fd84-8gl67 to minikube
  Normal   Created    5m59s (x4 over 6m52s)  kubelet, minikube  Created container ubuntu
  Normal   Started    5m58s (x4 over 6m52s)  kubelet, minikube  Started container ubuntu
  Normal   Pulling    5m17s (x5 over 7m5s)   kubelet, minikube  Pulling image "ubuntu"
  Normal   Pulled     5m15s (x5 over 6m52s)  kubelet, minikube  Successfully pulled image "ubuntu"
  Warning  BackOff    2m2s (x24 over 6m43s)  kubelet, minikube  Back-off restarting failed container
</code></pre>

<p>The <code>Events</code> section will provide you with detailed explanation on what happened.</p>
