<p>As per the <a href="https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/" rel="nofollow noreferrer">syntax</a> mentioned, below is the Pod yaml using <code>args</code>:</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
  labels:
    test: liveness
  name: liveness-exec
spec:
  containers:
  - name: liveness
    image: k8s.gcr.io/busybox
    resources:
      limits:
        memory: &quot;64Mi&quot; #64 MB
        cpu: &quot;50m&quot; #50 millicpu (.05 cpu or 5% of the cpu)
    args:
    - /bin/sh
    - -c
    - touch /tmp/healthy; sleep 30; rm -rf /tmp/healthy; sleep 600
    livenessProbe:
      exec:
        command:
        - cat
        - /tmp/healthy
      initialDelaySeconds: 5
      periodSeconds: 5
</code></pre>
<hr />
<p>Documentation says: <code>If you define args, but do not define a command, the default command is used with your new arguments.</code></p>
<p>As per the documentation, What is the default command for the arguments(in above yaml)?</p>

<p>&quot;Default command&quot; references the command set in your container image. In case of your image - <code>k8s.gcr.io/busybox</code> - this appears to be <code>/bin/sh</code>:</p>
<pre><code>$ docker pull k8s.gcr.io/busybox
Using default tag: latest
latest: Pulling from busybox
a3ed95caeb02: Pull complete 
138cfc514ce4: Pull complete 
Digest: sha256:d8d3bc2c183ed2f9f10e7258f84971202325ee6011ba137112e01e30f206de67
Status: Downloaded newer image for k8s.gcr.io/busybox:latest
k8s.gcr.io/busybox:latest
$ docker image inspect k8s.gcr.io/busybox | jq '.[0] | .Config.Cmd'
[
  &quot;/bin/sh&quot;
]
</code></pre>
<p>So, by explicitly setting a <code>pod.spec.containers.command</code>, you are effectively overriding that value.</p>
<p>See also:</p>
<pre><code>$ kubectl explain pod.spec.containers.command
KIND:     Pod
VERSION:  v1

FIELD:    command &lt;[]string&gt;

DESCRIPTION:
     Entrypoint array. Not executed within a shell. The docker image's
     ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME)
     are expanded using the container's environment. If a variable cannot be
     resolved, the reference in the input string will be unchanged. The
     $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME).
     Escaped references will never be expanded, regardless of whether the
     variable exists or not. Cannot be updated. More info:
     https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
</code></pre>
<p>Read more <a href="https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#define-a-command-and-arguments-when-you-create-a-pod" rel="nofollow noreferrer">here</a>.</p>
