-
Notifications
You must be signed in to change notification settings - Fork 39.3k
-
Notifications
You must be signed in to change notification settings - Fork 39.3k
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 run change default restart policy due to generator depreciation #82723
Comments
create a deployment default restart policy is "Always",it don't have "Never" restart policy。
so you use You can use this command to try
|
@ZP-AlwaysWin not sure what is different from what you added, my point is the default run errors out, if the other generators are depricated, the default generator or options for restart policy should change. I can submit a PR, but I was looking for support/ agreement before I put in the effort. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What happened:
Most of the generators for
kubectl run
have been depreciated per #68132As a result, the default invocation of
kubectl run -it some/image my-pod
is still complaining about this depreciation many versions later.This happens I believe because
--restart=Always
is the default and it is trying to generate a Deployment. Adding--restart=Never
to the command line creates a Pod by default. This should probably just be made the default given run is no longer encouraged for creating Replicas, Deployments, etc.What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
If you google for this, you will find SO posts and others saying that
kubectl run
is depreciated, which I don't believe it is. Just the generators moved over tokubectl create
, etc.Being able to use
kubectl run
in the same fashion as docker run for quick pod tests, etc is very useful..Environment:
kubectl version
):/sig CLI
The text was updated successfully, but these errors were encountered: