<p>I am running my docker image in my local machine (executing my performance test based on the arguments provided) with the following command
<a href="https://i.stack.imgur.com/tYGgL.png" rel="nofollow noreferrer">like this</a></p>
<p>whereas, satheeshpandianj/my-perf-app is my image name and rest (QA Commerce ListMarkets 1 5 Volvo) are arguments passed to this image to run. I have already pushed this image to docker hub. I want to run this docker image in kubernetes. I wrote the deployment yaml file like below.</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
   app: perf
  name: perf
spec:
  replicas: 1
  selector:
   matchLabels:
    app: perf
  template:
   metadata:
     labels:
      app: perf
   spec:
     containers:
       image: docker.io/satheeshpandianj/my-perf-app
       name: perf
       args: [&quot;QA&quot;, &quot;Commerce&quot;, ListMarkets&quot;, 1, 5, &quot;Volvo&quot;]
</code></pre>
<p>When I am executing &quot;kubectl apply -f perf.yaml&quot;, I am getting a below
<a href="https://i.stack.imgur.com/NyWKa.png" rel="nofollow noreferrer">error</a></p>
<p>Can someone help me to resolve this error? Or please correct me what changes need to be made in my yaml file. Thanks in advance.</p>

<p>You are getting this error because the spec.containers, expects a list.
You have to update your yaml to this:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
   app: perf
  name: perf
spec:
  replicas: 1
  selector:
   matchLabels:
    app: perf
  template:
   metadata:
     labels:
      app: perf
   spec:
     containers:
     - image: docker.io/satheeshpandianj/my-perf-app
       name: perf
       args: [&quot;QA&quot;, &quot;Commerce&quot;, ListMarkets&quot;, 1, 5, &quot;Volvo&quot;]
</code></pre>
<p>Yes, only the <code>-</code> is missing</p>
