Dar Nattp:
I don’t sure do this break the rule.
Do it necessary to use --restart=Nerver ?
Aneek Bera:
usually good, but not necessary
Trung Tran:
Always
means that the container will be restarted even if it exited with a zero exit code (i.e. successfully). This is useful when you don’t care why the container exited, you just want to make sure that it is always running (e.g. a web server). This is the default.
OnFailure
means that the container will only be restarted if it exited with a non-zero exit code (i.e. something went wrong). This is useful when you want accomplish a certain task with the pod, and ensure that it completes successfully - if it doesn’t it will be restarted until it does.
Never
means that the container will not be restarted regardless of why it exited.
https://kodekloud.com/community/t/can-someone-shed-light-on-restart-never-option-in-what-cases-would-you-use-it/10778
unnivkn:
Hi @Dar Nattp this will be applicable only on pods & not on deployments, sts etc which are usually used to deploy your applications. So if you have to apply on top of pods depends on the application, you may have to take a decision to use this option or not.
Dar Nattp:
Thanks all
So, it’s not necessary for CKA/CKAD right? on my opinion.
@unnivkn @Trung Tran @Aneek Bera
Trung Tran:
It not part of the exam curriculum, but basic knowledge that we need to know to control the application.