k8s
k8s copied to clipboard
Expose raw API calls for logs, exec, etc.
I would love the ability to send commands to running pods. Would solve a lot of problems for me. Big thumbs up!
I'm actually struggling to find a spec on how attach is implemented. Do you have any links in the core repo?
They have their own protocol built on top of http2, most of the core pieces are in k8s.io/apimachinery/pkg/util/httpstream for how they do the protocol negotiation/versioning and the actual http2 bits. k8s.io/kubernetes/pkg/client/unversioned/remotecommand has the protocol on top.
In addition there is a WebSocket variant since 1.6, if that is easier to support.
@chancez to the best of my understanding it's a SPDY upgrade, not HTTP/2.
@sttts since this client enables HTTP/2 I don't think Go will let the API server hijack the connection and switch to websockets.[0]
Maybe upstream would accept the PRs if I could get exec working over an HTTP/2 stream? :)
[0] https://golang.org/pkg/net/http/#Hijacker
Did exec over an HTTP/2 stream end up working?
This is still open. I haven't had time to dig into how much work it'd be to support, and a lot of the deployments patterns I personally use don't leverage exec.
On Fri, Aug 10, 2018, 11:08 AM Eric Cox [email protected] wrote:
Did exec over an HTTP/2 stream end up working?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ericchiang/k8s/issues/11#issuecomment-412161932, or mute the thread https://github.com/notifications/unsubscribe-auth/ACO_XYtvsjGFdVr5nwRfo40LORSkg_zaks5uPcwXgaJpZM4Ld57t .