<p>I am trying to get the POST and GET requests working (via Postman) but this is what I'm getting,</p>

<p><strong>GET Request</strong></p>

<pre><code>curl -X GET http://localhost:8080/api/v1/namespaces/default/pods/mypod/exec
</code></pre>

<p><strong>GET Response</strong></p>

<pre><code>{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {

  },
  "status": "Failure",
  "message": "the server could not find the requested resource",
  "reason": "NotFound",
  "details": {

  },
  "code": 404
}
</code></pre>

<p><strong>POST Request</strong></p>

<pre><code>curl -X POST 'http://localhost:8080/api/v1/namespaces/default/pods/mypod/exec?command=ls&amp;container=my-container&amp;stderr=true&amp;stdout=true'
</code></pre>

<p><strong>POST Response</strong></p>

<pre><code>{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {

  },
  "status": "Failure",
  "message": "Upgrade request required",
  "reason": "BadRequest",
  "code": 400
}
</code></pre>

<p>Any idea on how to get these requests working? What parameters need to be changed?</p>

<p>Thanks</p>

<p>I think you are trying to exec into a pod. A websocket connection is required if you want to exec into a pod.</p>
<p>For a websocket connection, an http(s) call is made first, followed by an upgrade request to websocket using the <em>HTTP Upgrade</em> header.</p>
<p>curl does not support upgrade from http to websocket. Hence the error.</p>
<p><em><a href="https://kubernetes.io/docs/tasks/tools/install-kubectl/" rel="nofollow noreferrer">kubectl</a> exec</em> would be handy for this use case.</p>
<p>You can also try other cli tools which support websockets, like</p>
<ul>
<li><a href="https://github.com/websockets/wscat" rel="nofollow noreferrer">wscat</a></li>
</ul>
