title: How can I debug why my single-job pod ends with status = "Error"?
body: <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>