1
votes

I am creating kubernetes cluster which include: 1 master node (M1), 2 worker nodes (W1 and W2)

Using deployment to create pods with replica count 5.

If pod dies kubernetes is re creating the pods. Count remains 5.

Lets suppose if W2 worker node dies due to any reason.

In this case does kubernetes will create a new node or just run all the replicas on the same node W1.

If i want to restore the died node automatically how can i do that?

1
restoring dead node is related to infra level rather than kubernetes cluster level. so answer is no. But in managed k8s services in public cloud providers maybe can do it for you.m303945

1 Answers

2
votes

This mostly depends on how you deployed things. Most cloud-integrated installers and hosted providers (GKE, EKS, AKS, Kops) use a node group of some kind so a fully failed node (machine terminated) would be replaced at that level. If the node is up but jammed, that would generally be solved by cluster-autoscaler starting a new node for you. Some installers that don't make per-cloud assumptions (Kubespray, etc) leave this up to you to handle yourself.