<p>I am following the Fedora getting started guide (<a href="https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/getting-started-guides/fedora/fedora_ansible_config.md">https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/getting-started-guides/fedora/fedora_ansible_config.md</a>) and trying to run the pod <code>fedoraapache</code>. But <code>kubectl</code> always shows <code>fedoraapache</code> as pending:</p>

<pre><code>POD                 IP                  CONTAINER(S)        IMAGE(S)            HOST                              LABELS              STATUS
fedoraapache                            fedoraapache        fedora/apache       192.168.226.144/192.168.226.144   name=fedoraapache   Pending
</code></pre>

<p>Since it is pending, I cannot run <code>kubectl log pod fedoraapache</code>. So,
I instead run <code>kubectl describe pod fedoraapache</code>, which shows the following errors:</p>

<pre><code>  Fri, 20 Mar 2015 22:00:05 +0800   Fri, 20 Mar 2015 22:00:05 +0800 1   {kubelet 192.168.226.144}   implicitly required container POD   created     Created with docker id d4877bdffd4f2a13a17d4cc93c27c1c93d5494807b39ee8a823f5d9350e404d4
  Fri, 20 Mar 2015 22:00:05 +0800   Fri, 20 Mar 2015 22:00:05 +0800 1   {kubelet 192.168.226.144}                       failedSync  Error syncing pod, skipping: API error (500): Cannot start container d4877bdffd4f2a13a17d4cc93c27c1c93d5494807b39ee8a823f5d9350e404d4:  (exit status 1)

  Fri, 20 Mar 2015 22:00:15 +0800   Fri, 20 Mar 2015 22:00:15 +0800 1   {kubelet 192.168.226.144}   implicitly required container POD   created Created with docker id 1c32b4c6e1aad0e575f6a155aebefcd5dd96857b12c47a63bfd8562fba961747
  Fri, 20 Mar 2015 22:00:15 +0800   Fri, 20 Mar 2015 22:00:15 +0800 1   {kubelet 192.168.226.144}   implicitly required container POD   failed  Failed to start with docker id 1c32b4c6e1aad0e575f6a155aebefcd5dd96857b12c47a63bfd8562fba961747 with error: API error (500): Cannot start container 1c32b4c6e1aad0e575f6a155aebefcd5dd96857b12c47a63bfd8562fba961747:  (exit status 1)

  Fri, 20 Mar 2015 22:00:15 +0800   Fri, 20 Mar 2015 22:00:15 +0800 1   {kubelet 192.168.226.144}       failedSync  Error syncing pod, skipping: API error (500): Cannot start container 1c32b4c6e1aad0e575f6a155aebefcd5dd96857b12c47a63bfd8562fba961747:  (exit status 1)

  Fri, 20 Mar 2015 22:00:25 +0800   Fri, 20 Mar 2015 22:00:25 +0800 1   {kubelet 192.168.226.144}       failedSync  Error syncing pod, skipping: API error (500): Cannot start container 8b117ee5c6bf13f0e97b895c367ce903e2a9efbd046a663c419c389d9953c55e:  (exit status 1)

  Fri, 20 Mar 2015 22:00:25 +0800   Fri, 20 Mar 2015 22:00:25 +0800 1   {kubelet 192.168.226.144}   implicitly required container POD   created Created with docker id 8b117ee5c6bf13f0e97b895c367ce903e2a9efbd046a663c419c389d9953c55e
  Fri, 20 Mar 2015 22:00:25 +0800   Fri, 20 Mar 2015 22:00:25 +0800 1   {kubelet 192.168.226.144}   implicitly required container POD   failed  Failed to start with docker id 8b117ee5c6bf13f0e97b895c367ce903e2a9efbd046a663c419c389d9953c55e with error: API error (500): Cannot start container 8b117ee5c6bf13f0e97b895c367ce903e2a9efbd046a663c419c389d9953c55e:  (exit status 1)

  Fri, 20 Mar 2015 22:00:35 +0800   Fri, 20 Mar 2015 22:00:35 +0800 1   {kubelet 192.168.226.144}   implicitly required container POD   failed  Failed to start with docker id 4b463040842b6a45db2ab154652fd2a27550dbd2e1a897c98473cd0b66d2d614 with error: API error (500): Cannot start container 4b463040842b6a45db2ab154652fd2a27550dbd2e1a897c98473cd0b66d2d614:  (exit status 1)

  Fri, 20 Mar 2015 22:00:35 +0800   Fri, 20 Mar 2015 22:00:35 +0800 1   {kubelet 192.168.226.144}   implicitly required container POD   created     Created with docker id 4b463040842b6a45db2ab154652fd2a27550dbd2e1a897c98473cd0b66d2d614
  Fri, 20 Mar 2015 21:42:35 +0800   Fri, 20 Mar 2015 22:00:35 +0800 109 {kubelet 192.168.226.144}   implicitly required container POD   pulled      Successfully pulled image "kubernetes/pause:latest"
  Fri, 20 Mar 2015 22:00:35 +0800   Fri, 20 Mar 2015 22:00:35 +0800 1   {kubelet 192.168.226.144}                       failedSync  Error syncing pod, skipping: API error (500): Cannot start container 4b463040842b6a45db2ab154652fd2a27550dbd2e1a897c98473cd0b66d2d614:  (exit status 1)
</code></pre>

<p>There are several reasons container can fail to start:</p>

<ul>
<li><p>the container command itself fails and exits -> check your docker image and start up script to make sure it works. 
Use 
<code>sudo docker ps -a</code> to find the offending container and 
<code>sudo docker logs &lt;container&gt;</code> to check for failure inside the container</p></li>
<li><p>a dependency is not there: that happens for example when one tries to mount a volume that is not present, for example <em>Secrets</em> that are not created yet. 
--> make sure the dependent volumes are created.</p></li>
</ul>
