<p>I have one docker image and I am using following command to run it. </p>

<pre><code>docker run -it -p 1976:1976 --name demo demo.docker.cloud.com/demo/runtime:latest
</code></pre>

<p>I want to run the same in Kubernetes. This is my current yaml file.</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>apiVersion: v1
kind: Deployment
metadata:
  name: demo-deployment
  labels:
    app: demo
spec:
  replicas: 1
  selector:
    matchLabels:
      app: demo
  template:
    metadata:
      labels:
        app: demo
    spec:
      containers:
      - name: demo
        image: demo.docker.cloud.com/demo/runtime:latest
        ports:
        - containerPort: 1976
        imagePullPolicy: Never</code></pre>
</div>
</div>
</p>

<p>This yaml file covers everything except flag "-it". I am not able to find its Kubernetes equivalent. Please help me out with this. Thanks</p>

Akash Kumar
<p><code>kubectl run</code> is the close match to <code>docker run</code> based on the requested scenario.</p>
<p>Some examples from Kubernetes documentation and it's purpose :</p>
<pre class="lang-sh prettyprint-override"><code>kubectl run -i --tty busybox --image=busybox -- sh  # Run pod as interactive shell
kubectl run nginx --image=nginx -n 
mynamespace                                         # Run pod nginx in a specific namespace
kubectl run nginx --image=nginx                     # Run pod nginx and write its spec into a file called pod.yaml
--dry-run=client -o yaml &gt; pod.yaml

</code></pre>
