Skip to content

v0.4.8

Latest

Choose a tag to compare

@awmirantis awmirantis released this 08 Oct 14:38
daa976a

Fixes #569: streaming exec and attach fail against Kubernetes 1.36 and newer.

The streaming server was configured with a scheme-relative BaseURL ("/cri/"),
so exec and attach URLs were advertised without a scheme or host. Kubernetes
1.36 enables ExtendWebSocketsToKubelet by default, which connects directly to
the advertised URL rather than tunneling through the API server. The client
then resolves the relative URL against the originating request's scheme
(HTTPS) while the streaming server listens plaintext, producing:

http: server gave HTTP response to HTTPS client

Leaving BaseURL nil lets streaming.NewServer populate the correct scheme and
host.

Note that --streaming-bind-addr is not a workaround: it corrects the
advertised host but not the missing scheme.

Verified against Kubernetes 1.37.1 with the WebSocket exec path enabled.