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
Shell into Windows containers #735
Comments
I ended up creating a workaround. If you add the following to ~/.k9s/plugin.yml then you can press plugin:
windows-shell:
shortCut: w
description: "Shell (Windows)"
scopes:
- containers
command: sh
background: false
confirm: false
args:
- -c
- "kubectl exec -it -n $NAMESPACE $POD -- cmd.exe" Only tested on WSL Ubuntu. |
I went down the plugin route as well but ran in to some weirdness with the plugin as posted by @mjsmith1028. I needed something like this that didn't use "sh", specified the context, and by default goes to powershell since that is in all of our Windows images. This is tested in Terminal in Windows (not in WSL) but would probably work there as well since it only relies on kubectl.
|
Is your feature request related to a problem? Please describe.
At the moment, one can only shell into Linux containers using k9s. Since mixed Kubernetes clusters have gained some traction recently, I think it is a good idea to provide a shell into Windows containers as well.
Describe the solution you'd like
The easiest way would be to utilize
kubectl exec
which provides this functionality out of the box and doesn't require PowerShell installation locally.Additional context
I do understand that even though it sounds simple, there are a lot of caveats we should consider.
The text was updated successfully, but these errors were encountered: