I was working through operating-system updates on an RKE2 cluster. At the etcd node group, the next step depended on checking the datastore before taking any of its members offline.

Those etcd checks revealed the state that determined the maintenance plan: three queried endpoints were healthy, but the membership configuration left no room for an etcd reboot.

The membership list contained four voting members. Three were the intended etcd servers; the fourth was associated with a machine currently identified in Kubernetes as a worker. The operator identified that fourth etcd member as unavailable. With four voters, quorum required three. The three available servers were the entire majority.

The task became moving from that observed state to a topology that supported continuing the OS updates: three healthy voters, requiring two for quorum. Establishing why the extra membership entry existed was not necessary to define that target. Establishing which member could be removed was.

The etcd Checks Revealed the Operating State

The initial health command explicitly queried the three intended etcd endpoints. All three returned true. The separate membership query listed four members, each with IS LEARNER = false. Read together with the operator’s identification of the unavailable member, those results exposed the quorum constraint before another server was taken offline.

The investigation depended on what each check contributed:

Check What it reveals How it informs the next operation
member list Registered identities, peer addresses, and voter/learner membership Establish the configuration used to calculate quorum and identify the exact change target
endpoint health Whether the queried endpoints pass etcd’s health check Establish which tested endpoints can currently participate in a functioning cluster
endpoint status Member and leader identities, Raft term/index observations, version, and reported errors Inspect leadership and replication progress before and after subsequent maintenance

Membership and health supplied the decisive starting-state evidence here. Endpoint status became part of the later leadership and maintenance checks. A Kubernetes node list alone would not have exposed the four-voter configuration.

That distinction changed the maintenance decision:

State Registered voters Quorum required Available voters Additional voter outages tolerated
Observed starting state 4 3 3 0
Intended and subsequently observed topology 3 2 3 1

The starting availability count relies on the operator’s report that the fourth member was unavailable. The displayed health check did not query that fourth endpoint and independently prove its failure.

For a stable voting configuration, the majority is:

quorum = floor(voters / 2) + 1

Learners do not count toward that voting majority. In this case, all four entries were voters. Taking one of the three available voters offline before correcting membership would have left only two available out of four: below quorum.

The health results established a working baseline. Combining them with voting membership turned that baseline into the decision needed for the OS update: could the remaining cluster continue making progress while one of those servers was unavailable? In the starting configuration, the answer was no. The preflight had identified a condition to correct before the next reboot.

Establish the Member’s Identity and Disposition

The initial membership table showed the worker-associated entry as started. That label did not establish current peer connectivity. Kubernetes also showed the worker as Ready, which described a different system’s observation of the host.

I inspected the pods assigned to the worker. Its kube-system listing included kube-proxy, ingress, and a snapshot-controller pod, with no etcd pod shown. That supported investigating the etcd entry separately from the Kubernetes node. It did not make the worker disposable.

For another occurrence, the identity check needs to correlate:

  • The exact etcd member ID and peer URL in the current membership list.
  • The intended role of the corresponding host.
  • Its current RKE2 service and etcd process/listener state, where accessible.
  • The health and membership of the surviving voters.

A worker role label or an absent mirror pod is not, alone, proof that no etcd process exists. The conversation proposed checking rke2-agent, rke2-server, and ports 2379/2380 on that host, but it does not reproduce those results. Those checks should not be retroactively marked complete.

The operational boundary was specific: remove the identified etcd membership entry while retaining the Kubernetes worker. A membership correction is not a reason to delete the Node object or reset the cluster.

Put Each Command in the Right Execution Context

Part of the investigation initially failed before reaching etcd. The SSH shell did not have kubectl in its PATH, and command flags entered on separate lines were interpreted as standalone shell commands.

The server did have RKE2’s bundled client and an administrator kubeconfig. Using their full paths produced successful node, membership, and health queries.

The following is a sanitized adaptation of that command arrangement. Use the inspected server’s valid kubeconfig and verified pod name; the documentation addresses are placeholders for the three intended endpoints:

KCTL=(
  sudo /var/lib/rancher/rke2/bin/kubectl
  --kubeconfig /etc/rancher/rke2/rke2.yaml
)

"${KCTL[@]}" config view --minify \
  -o jsonpath='{.clusters[0].cluster.server}{"\n"}'
"${KCTL[@]}" get nodes -o wide

ETCD=(
  "${KCTL[@]}"
  -n kube-system exec etcd-etcd-1 -- etcdctl
  --endpoints=https://192.0.2.10:2379,https://192.0.2.11:2379,https://192.0.2.12:2379
  --cacert=/var/lib/rancher/rke2/server/tls/etcd/server-ca.crt
  --cert=/var/lib/rancher/rke2/server/tls/etcd/server-client.crt
  --key=/var/lib/rancher/rke2/server/tls/etcd/server-client.key
)

"${ETCD[@]}" member list --write-out=table
"${ETCD[@]}" endpoint health --write-out=table
"${ETCD[@]}" endpoint status --write-out=table

Here the kubeconfig is read on the host running kubectl; the etcdctl executable and TLS paths are resolved inside the selected etcd container. This access path also depends on the Kubernetes API and that pod remaining available. A failed exec session does not itself prove an etcd endpoint failed.

In Bash, echo "$ETCD" displays only the first array element. Inspect the complete command with:

declare -p ETCD
printf '%q ' "${ETCD[@]}"
printf '\n'

The array preserves argument boundaries when invoked as "${ETCD[@]}". Its multiline declaration does not need backslashes between array elements. An ordinary multiline command does need appropriate line continuation.

Make the Targeted Transition While Quorum Still Exists

Endpoint health was the gate for moving forward, not just a check at the end. The three successful responses established the functioning baseline against which the membership correction could be considered. Membership supplied the quorum requirement; health checks supplied direct evidence about the queried endpoints. The operator’s separate report accounted for the unavailable fourth member.

The pathway was:

membership + endpoint health -> establish the current quorum constraint
fresh health check + verified target + recovery material -> membership-change gate
new membership + cluster endpoint health -> verify the target topology
repeat health/status checks -> release the next maintenance step

If one of the three intended endpoints failed its fresh health check, the condition supporting the planned correction would have changed. The next action would be to reassess availability and the failure, not continue because an earlier table was green. A failed client or Kubernetes exec command also needs diagnosis: failure to obtain a health result is not itself proof of a failed etcd member.

Membership reconfiguration itself requires a functioning majority. This was a live-cluster correction while three of four voters remained available, not a procedure for recovering after quorum had already been lost.

The proposed sequence was to preserve a fresh RKE2 snapshot and matching server token, verify the snapshot file and recovery custody, then re-read membership and health immediately before removing the exact identified member. The membership-changing command shape is:

etcdctl [verified endpoint and TLS options] member remove <verified-member-id>

That changes consensus membership. It does not delete the Kubernetes worker. In an RKE2-managed installation, also confirm the intended node configuration will not attempt to recreate the unwanted role or membership.

The retained conversation does not show the removal command’s execution response or a completed pre-removal snapshot verification for this cluster. It shows the operator reporting the correction and supplying the subsequent membership and health output. The account can establish the observed state change without inventing the missing execution record.

Verify the Result Against the Target

The subsequent membership list contained exactly the three intended entries, all still voters. The worker-associated member ID was absent. Crucially, the cluster-discovered health check returned three healthy endpoints: the target membership was not merely smaller, its intended endpoints were functioning at that checkpoint.

"${ETCD[@]}" member list --write-out=table
"${ETCD[@]}" endpoint health --cluster --write-out=table

Before the change, the explicit endpoint list had selected three servers from a four-voter configuration. After the change, --cluster used membership discovery to query the advertised client endpoints. Its usefulness still depends on correct advertised addresses and connectivity; discovery is not a guarantee that every endpoint will be reachable.

The change satisfied the topology objective: three available voters with a majority of two. That restored one-member outage tolerance at the consensus layer, assuming the other two voters and their dependencies remained healthy and mutually reachable. Shared storage, networking, or host failures can still defeat that assumption.

For maintenance release, repeat membership, health, and endpoint-status checks after a settle interval, confirm recovery material is available, and maintain one member at a time. Plan an observation path that does not disappear with the node being rebooted. The supplied before-and-after output establishes the membership correction; it does not by itself establish sustained application availability or completion of the later OS maintenance.

The Useful Outcome Was a Better Next State

The desired outcome was not an explanation for the fourth voter. It was a current configuration whose membership, availability, and quorum requirement were consistent with the next OS-maintenance operation.

Three healthy endpoint responses had initially described a cluster operating at its available quorum limit. The same three healthy voters, after the targeted membership correction, had a majority requirement of two.

The transferable method starts with the etcd checks: establish membership, test endpoint health, inspect status, then calculate whether the voters remaining during maintenance can sustain quorum. Those observations reveal the current state, justify the targeted transition, and provide the checks against which to verify the result. A healthy cluster and a cluster with maintenance headroom are not necessarily the same state.

References