# Deployment die

**URL:** <https://discuss.kubernetes.io/t/deployment-die/21837>\
**Category:** General Discussions\
**Created:** [November 4, 2022, 12:43pm UTC](https://discuss.kubernetes.io/t/deployment-die/21837 "2022-11-04T12:43:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lelunicu](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/lelunicu/32/3086_2.png) [@lelunicu](https://discuss.kubernetes.io/u/lelunicu)\
**Post date:** [November 4, 2022, 12:43pm UTC](https://discuss.kubernetes.io/t/deployment-die/21837/1 "2022-11-04T12:43:25Z")

</div>

Let`s say i deployed 5 pods(a deployment with 5 replica) and after a while a pod dies.The deployment controller will recreate a new pod?

---

<div class="post-metadata">

**Author:** ![xavi](https://avatars.discourse-cdn.com/v4/letter/x/8e8cbc/32.png) [@xavi](https://discuss.kubernetes.io/u/xavi)\
**Post date:** [November 4, 2022, 7:14pm UTC](https://discuss.kubernetes.io/t/deployment-die/21837/2 "2022-11-04T19:14:21Z")

</div>

Yes

> You describe a _desired state_ in a Deployment, and the Deployment [Controller](https://kubernetes.io/docs/concepts/architecture/controller/) changes the actual state to the desired state at a controlled rate.

See [Deployments | Kubernetes](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/)

Best regards,

Xavi

---

<div class="post-metadata">

**Author:** ![lelunicu](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/lelunicu/32/3086_2.png) [@lelunicu](https://discuss.kubernetes.io/u/lelunicu)\
**Post date:** [November 5, 2022, 9:43am UTC](https://discuss.kubernetes.io/t/deployment-die/21837/3 "2022-11-05T09:43:10Z")

</div>

If i just create a pod and not a deplyment then if that pod dies will not be created a new pod.This is because no controller control the state of this pod.true?

---

<div class="post-metadata">

**Author:** ![xavi](https://avatars.discourse-cdn.com/v4/letter/x/8e8cbc/32.png) [@xavi](https://discuss.kubernetes.io/u/xavi)\
**Post date:** [November 5, 2022, 9:50pm UTC](https://discuss.kubernetes.io/t/deployment-die/21837/4 "2022-11-05T21:50:12Z")

</div>

I would say “yes”, because there is no such thing a a “pod controller”; pods deployed directly are referred in the documentation as _naked pods_:

> Don’t use naked Pods (that is, Pods not bound to a [ReplicaSet](https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/) or [Deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/)) if you can avoid it. **Naked Pods will not be rescheduled in the event of a node failure**.

From [Configuration Best Practices | Kubernetes](https://kubernetes.io/docs/concepts/configuration/overview/#naked-pods-vs-replicasets-deployments-and-jobs)

P.S: As the notion of the “pod dying” may be open to interpretation, you may also take a look to [Container restart policy](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy):

> The `restartPolicy` applies to all containers in the Pod. `restartPolicy` only refers to restarts of the containers by the kubelet on the same node. After containers in a Pod exit, the kubelet restarts them with an exponential back-off delay […]

So even if there is no _pod-controller_, if one or more containers fail for some reason, they will be restarted by the kubelet according to the `restartPolicy` defined in the pod spec.

Best regards,

Xavi
