I have a pod test-1495806908-xn5jn
with 2 containers. I\'d like to restart one of them called container-test
. Is it possible to restart a single co
All the above answers have mentioned deleting the pod...but if you have many pods of the same service then it would be tedious to delete each one of them...
Therefore, I propose the following solution, restart:
1) Set scale to zero :
kubectl scale deployment <> --replicas=0 -n service
The above command will terminate all your pods with the name <
2) To start the pod again, set the replicas to more than 0
kubectl scale deployment <> --replicas=2 -n service
The above command will start your pods again with 2 replicas.