<p>May be I am missing some basic here. My pod failing at executing the shell command</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1
kind: ReplicaSet
metadata:
  name: redis-rs01
  labels:
    name: redis-rs01
    run: redis-rs01
    app: redis
spec:
  replicas: 3
  selector:
    matchLabels:
      app: redis
  template:
    metadata:
      name: redis
    labels:
      app: redis
    spec:
      volumes:
      - name: vol001
        emptyDir: {}
      containers:
      - name: redis
        image: redis
        ports:
        - containerPort: 6739
        env:
          - name: MY_NODE_NAME
            valueFrom:
              fieldRef:
                fieldPath: spec.nodeName
        volumeMounts:
        - name: vol001
          mountPath: /tmp
        command: [&quot;/bin/sh -c 'mkdir /tmp &amp;&amp; touch /tmp/date.log'&quot;]
</code></pre>
<p>From <code>describe</code> I am getting error as below</p>
<pre><code>Warning  Failed     14s (x3 over 32s)  kubelet            

Error: failed to create containerd task: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: 
exec: &quot;/bin/sh -c 'mkdir /tmp &amp;&amp; touch /tmp/date.log'&quot;: stat /bin/sh -c 'mkdir /tmp &amp;&amp; touch /tmp/date.log': no such file or directory: unknown
</code></pre>
<p>Any suggestions, much appreciated.</p>
<p>Thank you.</p>

Raja G
<p>You need to format your command to separate the arguments properly, right now your entire shell command is being perceived as a &quot;file that is a shell script&quot; to be executed with &quot;sh -c&quot;. And since there is no file named <code>mkdir /tmp &amp;&amp; touch /tmp/date.log</code> the shell returns an error.</p>
<p>You can fix this as follows:</p>
<pre><code>command: [&quot;/bin/sh&quot;, &quot;-c&quot;, &quot;mkdir /tmp &amp;&amp; touch /tmp/date.log&quot;]
</code></pre>
