Service Configuration
medium

Questão de Service Configuration #019e3a4f

Enunciado da Questão
Service Configuration
#kubernetes
#high-availability
#etcd
#control-plane
Médio

How many hosts are required to set up a highly available Kubernetes cluster when using an external etcd topology?

A

Four hosts. Two for control plane nodes and two for etcd nodes.

B

Four hosts. One for a control plane node and three for etcd nodes.

C

Three hosts. The control plane nodes and etcd nodes share the same host.

D

Six hosts. Three for control plane nodes and three for etcd nodes.

Correta

Explicação Oficial / Explicações da Comunidade

Summary

For a highly available Kubernetes cluster using an external etcd topology, a minimum of six hosts is required: three for control plane nodes and three for etcd nodes. This ensures both the control plane and the etcd cluster have quorum and can tolerate failures.

How it Works

In a highly available Kubernetes cluster, both the control plane and the etcd datastore must be deployed in a redundant manner. The control plane components (kube-apiserver, kube-controller-manager, kube-scheduler) are typically run on multiple nodes to provide fault tolerance. Similarly, etcd, which stores all cluster data, requires an odd number of members (usually 3 or 5) to maintain quorum. When using an external etcd topology, the etcd cluster runs on separate hosts from the control plane nodes. This separation allows independent scaling and management.

Why the Correct Answer is Right

The correct configuration uses three control plane nodes and three etcd nodes, totaling six hosts. With three control plane nodes, the cluster can survive the failure of one control plane node while still maintaining a majority for leader election. With three etcd nodes, the etcd cluster can tolerate the loss of one node and still have quorum (2 out of 3). This setup meets the high availability requirements for both layers.

Why the Incorrect Answers are Wrong

  • Four hosts with two control plane nodes and two etcd nodes: Two control plane nodes do not provide true high availability because if one fails, the remaining node cannot achieve quorum (requires majority of 2, but only 1 remains). Similarly, two etcd nodes cannot tolerate a single failure without losing quorum.
  • Four hosts with one control plane node and three etcd nodes: A single control plane node is a single point of failure. If it goes down, the cluster loses management capabilities. While the etcd cluster is highly available, the control plane is not.
  • Three hosts where control plane and etcd share the same host: This configuration combines both roles on the same three hosts. While it reduces hardware requirements, it creates a tight coupling. A failure of one host affects both the control plane and etcd, potentially causing loss of quorum in both layers. Additionally, this setup is not recommended for production high availability because it does not provide independent scaling and increases the blast radius of failures.