k8s icon indicating copy to clipboard operation
k8s copied to clipboard

Expose raw API calls for logs, exec, etc.

Open ericchiang opened this issue 8 years ago • 7 comments

ericchiang avatar Jan 09 '17 03:01 ericchiang

I would love the ability to send commands to running pods. Would solve a lot of problems for me. Big thumbs up!

leosunmo avatar Mar 21 '17 01:03 leosunmo

I'm actually struggling to find a spec on how attach is implemented. Do you have any links in the core repo?

ericchiang avatar Mar 21 '17 04:03 ericchiang

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.

chancez avatar Mar 30 '17 03:03 chancez

In addition there is a WebSocket variant since 1.6, if that is easier to support.

sttts avatar Mar 30 '17 06:03 sttts

@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

ericchiang avatar Mar 30 '17 16:03 ericchiang

Did exec over an HTTP/2 stream end up working?

ericox avatar Aug 10 '18 18:08 ericox

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 .

ericchiang avatar Aug 11 '18 20:08 ericchiang