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?
You describe a desired state in a Deployment, and the Deployment Controller changes the actual state to the desired state at a controlled rate.
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?
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:
P.S: As the notion of the “pod dying” may be open to interpretation, you may also take a look to Container restart policy:
restartPolicyapplies to all containers in the Pod.
restartPolicyonly 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.