<p>I am currently working on a monitoring service that will monitor Kubernetes' deployments and their pods. I want to notify users when a deployment is not running the expected amount of replicas and also when pods' containers restart unexpectedly. This may not be the right things to monitor and I would greatly appreciate some feedback on what I should be monitoring. </p>

<p>Anyways, the main question is the differences between all of the <em>Statuses</em> of pods. And when I say <em>Statuses</em> I mean the Status column when running <code>kubectl get pods</code>. The statuses in question are:</p>

<pre><code>- ContainerCreating
- ImagePullBackOff
- Pending 
- CrashLoopBackOff 
- Error 
- Running 
</code></pre>

<p>What causes pod/containers to go into these states? <br/>
For the first four Statuses, are these states recoverable without user interaction? <br/>
What is the threshold for a <code>CrashLoopBackOff</code>? <br/> 
Is <code>Running</code> the only status that has a <code>Ready Condition</code> of True? <br/> <br/>
Any feedback would be greatly appreciated! <br/> <br/>
Also, would it be bad practice to use <code>kubectl</code> in an automated script for monitoring purposes? For example, every minute log the results of <code>kubectl get pods</code> to Elasticsearch?</p>

<p>You can see the pod lifecycle details in k8s <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase" rel="nofollow noreferrer">documentation</a>.
The recommended way of monitoring kubernetes cluster and applications are with <a href="https://prometheus.io/" rel="nofollow noreferrer">prometheus</a></p>
