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

exec-as not working with containerd #40

Open
ineffyble opened this issue Aug 23, 2021 · 4 comments
Open

exec-as not working with containerd #40

ineffyble opened this issue Aug 23, 2021 · 4 comments

Comments

@ineffyble
Copy link

I was originally getting the type issue and applied the fix at https://github.com/jordanwilson230/kubectl-plugins/pull/36/files

Now I get a different error:

If you don't see a command prompt, try pressing enter.
Error attaching, falling back to logs: unable to upgrade connection: container effy-1 not found in pod effy-1_default
error during connect: Get "http://docker:2375/v1.24/containers/52b9ff502b9f1d16dc34808ecfe37702c985b0643bb8313d149c2c7121c1a3f6/json": dial tcp: lookup docker on 100.64.0.10:53: no such host
pod default/effy-1 terminated (Error)

My version details:

Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.9", GitCommit:"7a576bc3935a6b555e33346fd73ad77c925e9e4a", GitTreeState:"clean", BuildDate:"2021-07-15T21:01:38Z", GoVersion:"go1.15.14", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.9", GitCommit:"7a576bc3935a6b555e33346fd73ad77c925e9e4a", GitTreeState:"clean", BuildDate:"2021-07-15T20:56:38Z", GoVersion:"go1.15.14", Compiler:"gc", Platform:"linux/amd64"}
@jglick
Copy link

jglick commented Jun 23, 2022

I get a different error from kubectl ssh on a containerd-based cluster (Container-Optimized OS from Google, containerd://1.5.11, v1.23.6-gke.2200):

Connecting...
Pod: <redacted>
Namespace: NONE
User: root
Container: <redacted>
Command: /bin/sh

Error: No such container: 1c…c0
pod <redacted>/ssh-pod-2016 terminated (Error)

Seems to be parsing out a container id from the application pod containerd://1c…c0.

@gdubicki
Copy link

It's not working with k8s 1.22 on GKE for me too. I just got:

$ kubectl exec-as -u root -n bar -c foo foobar-5f9957469b-ggcc7

Connecting...
Pod: foobar-5f9957469b-ggcc7
Namespace: bar
User: root
Container: foo
Command: /bin/sh

error: timed out waiting for the condition

@tripflex
Copy link

tripflex commented Nov 1, 2022

Yup same, newer versions of K8s do not seem to work with this anymore now that docker does not exist on the node

@rejoshed
Copy link

https://stackoverflow.com/questions/42793382/exec-commands-on-kubernetes-pods-with-root-access

Seems the plugin should be aware of the container back end since it can now also be containerd and cri-o.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants