How to restart my PODs

A question …, i can be in a scenario where all was working fine and out of nowhere the PODs strangely went into an Error state. The problem if I have a: [CI / CD] system is that it might take a long time to reboot your POD as the Entire process has to be rerun.

Because of this, the best option I think would be to go for KUBECTL. But I understand that there are 2 ways to reset a POD (NOT directly from the POD), but through DEPLOYMENT.

$ kubectl rollout restart deployment dummy-deploy-001

$ kubectl scale deployment dummy-deploy-001 --replicas=0

$ kubectl scale deployment dummy-deploy-001 --replicas=1

¿ Which will be the best option?

Thank you.

Hello, @maktup
If you are talking about for Production. I guess no one use single Pod.
I am not getting your point. You are trying to reset your Pod or restart your Pod?

Hi i am talking about restart the pod the best form of these

you have two ways:
1- if your pod is static, then add any change and a new pod will be created with the new changes.
2- if you have a Deployment, replicaset or RC, just kubectl delete pod POD-NAME. If you have a “kind: Pod”, add your changes then use kubectl apply.