<p>I have an image that needs to be run in interactive mode (or else I get <code>EOFError: EOF when reading a line</code>).</p>

<pre><code>docker run -i imagename
</code></pre>

<p>Everything works fine when I run it in interactive mode but how do I specify that in the deployment YAML file?</p>

<p>My YAML looks like this:</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: stackoverflow
spec:
  replicas: 2
  minReadySeconds: 15
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 1
      maxSurge: 1
  template:
    metadata:
      labels:
        app: stackoverflow
    spec:
      containers:
        - image: stackoverflow
          imagePullPolicy: Always
          name: stackoverflow
          ports:
            - containerPort: 80
</code></pre>

Stanko
<blockquote>
  <p>Everything works fine when I run it in interactive mode but how do I specify that</p>
</blockquote>

<ul>
<li><p>in our statefusets (should work for deployments as well) we use following:</p>

<pre><code>...
containers:
  - image: stackoverflow
    name: stackoverflow
    stdin: true
    tty: true
    ...
</code></pre>

<p>note that <code>docker</code> flag <code>-i</code> corresponds to <code>stdin</code>, and flag <code>-t</code> to <code>tty</code> in container specification.</p></li>
</ul>

<p>As requested, here is <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.10/#container-v1-core" rel="nofollow noreferrer">v1.10 documentation reference</a> for container spec: </p>
