Restarting a specific pod inside a Deployment

Why not just kubectl delete pod <pod> ? It will remove your single pod and schedule new in it's place.

If rescheduling is a problem, you could try to kill the process running inside the container in pod with something like kubectl exec <pod> <container> kill 1, but some processes might not be willing to surrender easily :)


Pods are ephemeral resources in Kubernetes and cannot be restarted.

If you delete a pods from a deployment Kubernetes will try to reconcile the state of the deployment by starting another pod effectively restarting your pod.

Tags:

Kubernetes