-
Notifications
You must be signed in to change notification settings - Fork 844
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
kubectl exec [POD] [COMMAND] is DEPRECATED #44
Comments
I believe this is something we cannot fix. Take this for example:
Because you need to provide Though, I'm not planning to add bash functions, and I might actually remove exec functionality from this since there are only 2 aliases about this |
@ahmetb , I think |
The old syntax has been removed with v1.31.0. I fixed it for zsh like this: alias kex='f() { kubectl exec $1 -i -t -- "${@:2}"};f' #manual edit |
The nice part about the old usage is you can do Now this is impossible. I opened an upstream issue to revert it, though I wouldn't expect much. kubernetes/kubectl#1687. |
When running a command like
kexn test varnish-529679cb57-mjn62 bash
it translates tokubectl exec -i -t --namespace test varnish-529679cb57-mjn62 bash
and kubectl returns a deprecation warning:The problem is that
--namespace
is a positional argument, but to fix this issue it will need to not be last, but come before the--
. See https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#execThe text was updated successfully, but these errors were encountered: