<p>I want to use websocket to access Kubernetes API, and so it is more convenient to send token like <code>wss://example.com" + url + "&amp;access_token=blahblahblah</code>. The official API doc sends token in header. Where can I find such a token and send it with url?</p>

<p>What I want to do is to exec pods via a web page through websocket:</p>

<p><a href="https://github.com/kubernetes-ui/container-terminal" rel="nofollow">Container-Terminal via Websocket</a></p>

<p><a href="https://github.com/kubernetes/kubernetes/pull/13885" rel="nofollow">Support exec and pod logging over WebSockets</a></p>

<p>Bearer token authentication in the URL is not supported in Kubernetes currently, only as an <code>Authorization</code> header.</p>
