<p>I am exploring <a href="https://kubernetes.io/" rel="nofollow noreferrer">Kubernetes</a> Cluster orchestration and I am familiar with docker based containerization techniques.</p>

<p>Normally when starting docker containers, we pass different CLI Arguments(port options + Env variables) something like below</p>

<pre><code>docker run --name myService -p 8080:8080  -v /var/lib/otds:/usr/local/otds  -e VIRTUAL_PORT=8080 myImage
</code></pre>

<p>When I am trying to up the same on Kubernetes Cluster(using its CLI - kuberctl) I am seeing errors saying that these arguments are not recognized</p>

<p>I am trying something like below</p>

<pre><code>kuberctl run myService -p 8080:8080  -v /var/lib/otds:/usr/local/otds  -e VIRTUAL_PORT=8080 --image==myImage
</code></pre>

<p>I am looking for help on how to pass docker's CLI Arguments to KuberCTL </p>

<p><code>kubectl run</code> is just a shorthand convenience method. Normally you should be writing pod specs in YAML/JSON.</p>

<p>Based on your unfamiliarity with basics, I would highly recommend sitting down and following through some of the training material at <a href="https://kubernetes.io/docs/tutorials/" rel="nofollow noreferrer">https://kubernetes.io/docs/tutorials/</a></p>

<p>As for your question, in a pod spec, the <code>command</code>/<code>args</code> field is what you're looking for and it is documented here: <a href="https://kubernetes.io/docs/tasks/configure-pod-container/define-command-argument-container/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/configure-pod-container/define-command-argument-container/</a></p>

<p>Here's a sample:</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: demo
spec:
  containers:
  - name: foo
    image: alpine
    command: ["date"]
</code></pre>
