-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
"--restart=Never" Still needed? #157
Comments
It was necessary for k8s lower than 1.18, not anymore. kubectl run only creates pods. |
Well while this is true but having restart=Never comes in handy when you are working with pods that have images like busybox, alpine etc. |
@shubhamrajvanshi Can you expand this? Why does it come in handy when working with busybox or alpine? |
@srikanthsrs because mentioned images without i.e. sleep infinity command will exit with 0 exit code (container exits) and then will be restarted. Nginx image has infinity process running inside so it wont exit - wont be restarted (container is running) |
If |
I don't think we need
--restart=Never
option anymore with the latest K8s version as no deployment is created when we runkubectl run nginx --image=nginx
The text was updated successfully, but these errors were encountered: