What is the difference between a rollout restart
of a deployment and killing
a pod ?
Both will recreate the pods no matter what.
kubectl delete pod
will only stop one replica of a deployment.
kubectl rollout restart deployment
will delete and recreate all of the replicas.
There aren't really significant operational differences beyond this. The Deployment owns the Pods (via an intermediate ReplicaSet) and changes in the Pod spec will cause Kubernetes itself to delete the managed Pods. There are also some cases where a Pod will get deleted automatically (the pod and cluster autoscalers are obvious examples). You can delete an individual Pod by hand, or ask Kubernetes to have something else delete it, but the underlying mechanism is the same.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With