What happens when the Kubernetes master fails?

后端 未结 2 1623
星月不相逢
星月不相逢 2020-12-24 05:19

I\'ve been trying to figure out what happens when the Kubernetes master fails in a cluster that only has one master. Do web requests still get routed to pods if this happens

相关标签:
2条回答
  • 2020-12-24 05:37

    Kubernetes cluster without a master is like a company running without a Manager.

    No one else can instruct the workers(k8s components) other than the Manager(master node)
    (even you, the owner of the cluster, can only instruct the Manager)

    Everything works as usual. Until the work is finished or something stopped them.(because the master node died after assigning the works)

    As there is no Manager to re-assign any work for them, the workers will wait and wait until the Manager comes back.

    The best practice is to assign multiple managers(master) to your cluster.

    0 讨论(0)
  • 2020-12-24 05:45

    It's my understanding that the master runs the API, and now (since 1.3?) Manages the underlying cloud infrastructure. When it is offline, the API will be offline, so the cluster ceases to be a cluster and is instead a bunch of ad-hoc nodes for this period. The cluster will not be able to respond to node failures, create new resources, move pods to new nodes, etc. Until the master is back online.

    However, in any case, life for applications will continue as normal unless nodes are rebooted, or there is a dramatic failure of some sort during this time, because TCP/ UDP services, load balancers, DNS, the dashboard, etc. Should all continue to function.

    If a node is rebooted, DNS queries may not resolve correctly until the master comes back online.

    If you'd like to test this out yourself, I recommend kubeadm-dind-cluster or kind.

    0 讨论(0)
提交回复
热议问题