-
Notifications
You must be signed in to change notification settings - Fork 41.1k
Remove deprecated kubectl exec command execution without dash #125437
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
Remove deprecated kubectl exec command execution without dash #125437
Conversation
/triage accepted |
/label tide/merge-method-squash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
LGTM label has been added. Git tree hash: c1f58669e2b5606bac9becc4ecde4ee6f802d388
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ardaguclu, soltysh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…etes#125437) * Remove deprecated kubectl exec command execution without dash * Use command execution with dash in kubectl exec * Modify unit tests to only use command after dash
Changelog suggestion -Removing deprecated kubectl exec [POD] [COMMAND]
+Removed the ability to run `kubectl exec [POD] [COMMAND]` (without a `--` separator).
+The `--` separator has been recommended since the Kubernetes v1.18 release, which
+also deprecated the legacy way of invoking `kubectl exec`. Aside: We never formally deprecated the old way, but I can see that the code has been printing warnings saying that we did. |
…etes#125437) * Remove deprecated kubectl exec command execution without dash * Use command execution with dash in kubectl exec * Modify unit tests to only use command after dash
…etes#125437) * Remove deprecated kubectl exec command execution without dash * Use command execution with dash in kubectl exec * Modify unit tests to only use command after dash
Current example fails since kubectl version 1.31: ```sh $ kubectl exec -it deployment/coder /bin/bash -n coder error: exec [POD] [COMMAND] is not supported anymore. Use exec [POD] -- [COMMAND] instead ``` The legacy syntax was removed in: kubernetes/kubernetes#125437
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
kubectl exec [POD] [COMMAND]
execution functionality was deprecated nearly 5 years ago by #88460 and it is suggested to usekubectl exec [POD] -- [COMMAND]
instead.This PR removes this functionality by returning an error.
Does this PR introduce a user-facing change?