<p>I'm setting up a Kubernetes cluster and am testing a small container. This is my YAML file for the pod:</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: example
spec:
  restartPolicy: Never
  containers:
  - name: node
    image: 'node:5'
    command: ['node']
    args: ['-e', 'console.log(1234)']
</code></pre>

<p>I deploy it with <code>kubectl create -f example.yml</code> and sure enough it runs as expected:</p>

<pre><code>$ kubectl logs example
1234
</code></pre>

<p>However, the pod's status is "Error":</p>

<pre><code>$ kubectl get po example
NAME           READY     STATUS    RESTARTS   AGE
example        0/1       Error     0          16m
</code></pre>

<p>How can I investigate why the status is "Error"?</p>

<p><code>kubectl describe pod example</code> will give you more info on what's going on</p>

<p>also</p>

<p><code>kubectl get events</code> can get you more details too although not dedicated to the given pod.</p>
