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

Unable to return to k9s from pod exec #1705

Closed
johnnyhuy opened this issue Aug 10, 2022 · 20 comments
Closed

Unable to return to k9s from pod exec #1705

johnnyhuy opened this issue Aug 10, 2022 · 20 comments
Labels
Bugs Bugs, Hangs, Crash, and Freezes

Comments

@johnnyhuy
Copy link

johnnyhuy commented Aug 10, 2022

Discord username (optional)

No response

Describe the bug

I cannot run kubectl exec commands as it silently fails to open up a shell in a pod. However, when using tools like k9s exec works but then exiting with ctrl + D, the window becomes blank and unusable, which requires a restart of the tab.

To Reproduce

If we don't have a Kubernetes cluster ready. Use Minikube to spin one up locally - installation (Homebrew works as well), guide.

Create a deployment and exec into the pod.

$ kubectl exec deploy/hello-node -- /bin/sh

When using k9s exec into a pod by selecting a pod and press s, then exit with ctrl + D

Expected behaviour

We should see an interactive shell open up with kubectl exec

k9s should come back when exiting the shell.

Screenshots

No response

Operating System

MacOS

OS Version

11.6.1

Shell Version

zsh 5.8 (x86_64-apple-darwin20.0)

Warp Version

v0.2022.08.01.09.12.stable_02

Additional context

No response

Does this block you from using Warp daily?

Yes

Warp Internal (ignore): linear-label:b8107fdf-ba31-488d-b103-d271c89cac3e

No response

@zheng
Copy link
Contributor

zheng commented Aug 10, 2022

Do you have a list of steps I can get up and running with kubernetes and create a kubernetes pod? I've tried to look online, but it seems really nontrivial

@johnnyhuy
Copy link
Author

Hey @zheng good call, I've put some steps on how to run kubectl locally with Minikube. Requires Docker.

@szgupta
Copy link
Member

szgupta commented Aug 11, 2022

Hey @johnnyhuy,

  • for the kubectl part of the issue, I think you can get an interactive shell by specifying the -i and -t options when running exec. So something like kubectl exec -it deploy/hello-node -- /bin/sh should work!
  • for the k9s issue, we were able to repro inconsistently. Does this happen everytime for you when exiting k9s via CTRL-D?

@johnnyhuy
Copy link
Author

johnnyhuy commented Aug 12, 2022

Hey @johnnyhuy,

* for the `kubectl` part of the issue, I think you can get an interactive shell by specifying the `-i` and `-t` options when running `exec`. So something like `kubectl exec -it deploy/hello-node -- /bin/sh` should work!

* for the `k9s` issue, we were able to repro inconsistently. Does this happen everytime for you when exiting `k9s` via `CTRL-D`?

Awesome, using -it worked 🚀

For k9s I'm using kubectl create deployment hello-node --image=nginx since I'm on an M1, echo server doesn't work.

$ k9s version
 ____  __.________
|    |/ _/   __   \______
|      < \____    /  ___/
|    |  \   /    /\___ \
|____|__ \ /____//____  >
        \/            \/

Version:    0.25.18
Commit:     6085039f83cd5e8528c898cc1538f5b3287ce117
Date:       n/a

$ kubectl version
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.1", GitCommit:"3ddd0f45aa91e2f30c70734b175631bec5b5825a", GitTreeState:"clean", BuildDate:"2022-05-24T12:17:11Z", GoVersion:"go1.18.2", Compiler:"gc", Platform:"darwin/arm64"}
Kustomize Version: v4.5.4
Server Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.3", GitCommit:"816c97ab8cff8a1c72eccca1026f7820e93e0d25", GitTreeState:"clean", BuildDate:"2022-01-25T21:19:12Z", GoVersion:"go1.17.6", Compiler:"gc", Platform:"linux/arm64"}
$ minikube start
😄  minikube v1.25.2 on Darwin 11.6.1 (arm64)
✨  Using the docker driver based on existing profile
👍  Starting control plane node minikube in cluster minikube
🚜  Pulling base image ...
🏃  Updating the running docker "minikube" container ...
🐳  Preparing Kubernetes v1.23.3 on Docker 20.10.12 ...
    ▪ kubelet.housekeeping-interval=5m
🔎  Verifying Kubernetes components...
    ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟  Enabled addons: storage-provisioner, default-storageclass
🏄  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default

$ kubectl create deployment hello-node --image=nginx

$ k9s

This is what it looks like when I CTRL-D, I can't press anything to go back to k9s or even the home shell. I have to create a new tab and close that one to recover.

image

@johnnyhuy johnnyhuy changed the title Unable to kubectl exec Unable to exit out of K9S Aug 12, 2022
@johnnyhuy johnnyhuy changed the title Unable to exit out of K9S Unable to return to k9s from pod exec Aug 12, 2022
@szgupta
Copy link
Member

szgupta commented Aug 12, 2022

@johnnyhuy does it happen on a new tab as well? When I tried this the first time, the problem happened but it doesn't happen when I open a new tab and try k9s

@johnnyhuy
Copy link
Author

johnnyhuy commented Aug 12, 2022

@johnnyhuy does it happen on a new tab as well? When I tried this the first time, the problem happened but it doesn't happen when I open a new tab and try k9s

Weirdly enough I was able to exit back into k9s the first time but the following times I got the same issue. I typed some stuff and then pressed ctrl + D.

Another thing I've noticed was using k9s editing manifests on Vim and saving + exiting it would result in the same issue. But I couldn't reproduce it on my other device.

Screen Recording 2022-08-13 at 9 08 16 am

This time I've tried it on my M1 Pro on macOS 12.4

image

@amitpaz
Copy link

amitpaz commented Aug 13, 2022

Getting the same issues
Logs contain the following error:
/Application Support/k9s/views.yml: no such file or directory

@johnnyhuy
Copy link
Author

FYI, tested this with other terminals out in the wild like Tabby, VSCode and iTerm2, and they all behave correctly at all times 😬

@dannyneira
Copy link
Member

dannyneira commented Aug 18, 2022

We've been able to repro the shell/edit issue with k9s, we will provide updates as soon as we can.

also, kubectl exec deploy/<deployment_name> -- /bin/sh doesn't work on iTerm, terminal.app, VS Code Terminal either. Only works with the -it flag

@johnnyhuy
Copy link
Author

johnnyhuy commented Aug 18, 2022

We've been able to repro the shell/edit issue with k9s, we will provide updates as soon as we can.

also, kubectl exec deploy/<deployment_name> -- /bin/sh doesn't work on iTerm, terminal.app, VS Code Terminal either. Only works with the -it flag

That's right, that's on me. I missed the -it flag 😛

@mrfrsh
Copy link

mrfrsh commented Sep 30, 2022

Same Here! this is the only thing keeping me from using your amazing product 100% of the time.

@derlin
Copy link

derlin commented Oct 27, 2022

@dannyneira any news on this ?

@amitpaz
Copy link

amitpaz commented Oct 27, 2022

@dannyneira any news on this?

Still occurring on the latest version
image

@derlin
Copy link

derlin commented Oct 27, 2022

@amitpaz yes I know, this is why I would like to know if warp plans on addressing the issue soon, or if there is any changes on their side regarding this bug

@iochagov
Copy link

Still happens to me also

@md-fid
Copy link

md-fid commented Nov 21, 2022

Same here when using k9s (v0.2022.11.14.14.55.stable_01)

@ventsislav-georgiev
Copy link

ventsislav-georgiev commented Nov 23, 2022

@janeklb
Copy link

janeklb commented Nov 25, 2022

There's also #2133

@dannyneira
Copy link
Member

dannyneira commented Nov 29, 2022

Hi all, sorry about this issue, we know this is a huge blocker for many so we appreciate your patience.

Closing as duplicate, please +1 and track this issue there > #833

@dannyneira dannyneira closed this as not planned Won't fix, can't repro, duplicate, stale Nov 29, 2022
@dannyneira
Copy link
Member

We recently made performance/compatibility updates to alt-screen apps like emacs, please let us know if you're still seeing the issues with the latest version of Warp.

@warpdotdev-devx warpdotdev-devx bot added the Bugs Bugs, Hangs, Crash, and Freezes label Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugs Bugs, Hangs, Crash, and Freezes
Projects
None yet
Development

No branches or pull requests