<p>There's two kinds of status code of one-shot pods, running from API or the command:</p>

<p><code>kubectl run --restart=Never --image test:v0.1 ...</code>.</p>

<p>The pods produce output files to a NFS server, and I've got files successfully. </p>

<p><code>kubectl get pods -ao wide</code>:</p>

<pre><code>NAME       READY     STATUS       RESTARTS   AGE       
test-90    0/1       ExitCode:0   0          23m       192.168.1.43
test-91    0/1       ExitCode:0   0          23m       192.168.1.43
test-92    0/1       ExitCode:0   0          23m       192.168.1.43
test-93    0/1       ExitCode:0   0          23m       192.168.1.43
test-94    0/1       Error        0          23m       192.168.1.46
test-95    0/1       Error        0          23m       192.168.1.46
test-96    0/1       Error        0          23m       192.168.1.46
test-97    0/1       Error        0          23m       192.168.1.46
test-98    0/1       Error        0          23m       192.168.1.46
test-99    0/1       ExitCode:0   0          23m       192.168.1.43
</code></pre>

<p>the description of <code>ExitCode:0</code> pod:</p>

<pre><code>Name:                           test-99
Namespace:                      default
Image(s):                       test:v0.1
Node:                           192.168.1.43/192.168.1.43
Status:                         Succeeded
Replication Controllers:        &lt;none&gt;
Containers:
  test:
    State:              Terminated
      Exit Code:        0
    Ready:              False
    Restart Count:      0
</code></pre>

<p>the description of <code>Error</code> pod:</p>

<pre><code>Name:                           test-98
Namespace:                      default
Image(s):                       test:v0.1
Node:                           192.168.1.46/192.168.1.46
Status:                         Succeeded
Replication Controllers:        &lt;none&gt;
Containers:
  test:
    State:              Terminated
      Reason:           Error
      Exit Code:        0
    Ready:              False
    Restart Count:      0
</code></pre>

<p>Their NFS volumes:</p>

<pre><code>Volumes:
  input:
    Type:       NFS (an NFS mount that lasts the lifetime of a pod)
    Server:     192.168.1.46
    Path:       /srv/nfs4/input
    ReadOnly:   false
  output:
    Type:       NFS (an NFS mount that lasts the lifetime of a pod)
    Server:     192.168.1.46
    Path:       /srv/nfs4/output
    ReadOnly:   false
  default-token-nmviv:
    Type:       Secret (a secret that should populate this volume)
    SecretName: default-token-nmviv
</code></pre>

<p><code>kubectl logs</code> returns none, since the container just produces output files.</p>

<p>Thanks in advance!</p>

<p><code>ExitCode 0</code> means it terminated normally</p>

<p>Exit codes can be used if you pipe to another process, so the process knows what to do next (if previous process failed do this, else do something with the data passed...)</p>
