kubectl attach: Unable to use a TTY - container es-node did not allocate one
<p>I am trying to attach to a running container in Kubernetes, however I get the error message below. </p>

<pre><code>&gt;kubectl attach -it es-client-2756725635-4rk43 -c es-node
Unable to use a TTY - container es-node did not allocate one
If you don't see a command prompt, try pressing enter.
</code></pre>

<p>How do I enable a TTY in my container yaml?</p>