Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API for remote command execution #204

Closed
hongchaodeng opened this issue Jun 2, 2017 · 10 comments
Closed

API for remote command execution #204

hongchaodeng opened this issue Jun 2, 2017 · 10 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@hongchaodeng
Copy link
Contributor

In shell, you can use:

  • kubectl port-forward to send requests to a pod's endpoint
  • kubectl exec to execute commands in a pod

However, these are not obvious, easy to achieve in client API.
It would be great to provide easy to use API for such functionality.

@tamalsaha
Copy link
Member

I was also looking for this. It seems to me that this support has been added only very recently https://github.com/kubernetes/client-go/tree/master/tools/remotecommand

@TimBozeman
Copy link

Do you know how to use remotecommand?

I tried to cannibalize this implementation
https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/6a00fe8b7999a2b6bb34698c30db93665def55ff/executors/kubernetes/exec.go
, but can't seem to get it going. I keep getting a "Timeout occured".

@wefine
Copy link

wefine commented Oct 17, 2017

Hi, @TimBozeman

Do you know how to use remotecommand now?

@TimBozeman
Copy link

TimBozeman commented Oct 17, 2017

That's pretty much what I'm doing. Another example
https://github.com/zalando-incubator/postgres-operator/blob/master/pkg/cluster/exec.go

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 15, 2018
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 14, 2018
@davecramer
Copy link

the command will timeout if there is no response to stdout or stderr

@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@slinkydeveloper
Copy link

👍 I think we need an API to simplify access to this functionality, I wish to contribute. Someone can point me where I can start? 😄

mfojtik pushed a commit to mfojtik/client-go that referenced this issue Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

8 participants