<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>

Sam
<p>I will try to tell what I see hidden behind these terms</p>

<ul>
<li>ContainerCreating</li>
</ul>

<p>Showing when we wait to image be downloaded and the
container will be created by a docker or another system.</p>

<ul>
<li>ImagePullBackOff</li>
</ul>

<p>Showing when we have problem to download the image from a registry. Wrong credentials to log in to the docker hub for example.</p>

<ul>
<li>Pending</li>
</ul>

<p>The container starts (if start take time) or started but redinessProbe failed. </p>

<ul>
<li>CrashLoopBackOff</li>
</ul>

<p>This status showing when container restarts occur too much often. For example, we have process that tries to read not exists file and crash. Then the container will be recreated by Kube and repeat. </p>

<ul>
<li>Error</li>
</ul>

<p>This is pretty clear. We have some errors to run the container. </p>

<ul>
<li>Running</li>
</ul>

<p>All is good container running and livenessProbe is OK. </p>
