//NOTE TO CONTRIBUTORS:
//
//If you update any of the content in this assembly file, be sure to also make the same changes in the assemblies in the following file: backup_and_restore/control_plane_backup_and_restore/replacing-unhealthy-etcd-member.adoc.

:_mod-docs-content-type: ASSEMBLY
[id="replace-unhealthy-etcd-member"]
include::_attributes/common-attributes.adoc[]
= Replacing an unhealthy etcd member
:context: replace-unhealthy-etcd-member

toc::[]

The process to replace a single unhealthy etcd member depends on whether the etcd member is unhealthy because the machine is not running or the node is not ready, or because the etcd pod is crashlooping.

[NOTE]
====
If you have lost the majority of your control plane hosts, follow the disaster recovery procedure to xref:../../backup_and_restore/control_plane_backup_and_restore/disaster_recovery/scenario-2-restoring-cluster-state.adoc#dr-restoring-cluster-state[restore to a previous cluster state] instead of this procedure.

If the control plane certificates are not valid on the member being replaced, then you must follow the procedure to xref:../../backup_and_restore/control_plane_backup_and_restore/disaster_recovery/scenario-3-expired-certs.adoc#dr-recovering-expired-certs[recover from expired control plane certificates] instead of this procedure.

If a control plane node is lost and a new one is created, the etcd cluster Operator handles generating the new TLS certificates and adding the node as an etcd member.
====

// Identifying an unhealthy etcd member
include::modules/restore-identify-unhealthy-etcd-member.adoc[leveloffset=+1]

// Determining the state of the unhealthy etcd member
include::modules/restore-determine-state-etcd-member.adoc[leveloffset=+1]

== Replacing the unhealthy etcd member

Depending on the state of your unhealthy etcd member, use one of the following procedures:

* Replacing an unhealthy etcd member whose machine is not running or whose node is not ready
* Replacing a control plane node on an unhealthy cluster
* Replacing an unhealthy etcd member whose etcd pod is crashlooping
* Replacing an unhealthy stopped baremetal etcd member

// Replacing an unhealthy etcd member whose machine is not running or whose node is not ready
include::modules/restore-replace-stopped-etcd-member.adoc[leveloffset=+2]

[role="_additional-resources"]
.Additional resources
* xref:../../machine_management/control_plane_machine_management/cpmso-troubleshooting.adoc#cpmso-ts-etcd-degraded_cpmso-troubleshooting[Recovering a degraded etcd Operator]
* link:https://docs.redhat.com/en/documentation/assisted_installer_for_openshift_container_platform/2026/html/installing_openshift_container_platform_with_the_assisted_installer/expanding-the-cluster#installing-control-plane-node-unhealthy-cluster_expanding-the-cluster[Replacing a control plane node on an unhealthy cluster]

// Replacing an unhealthy etcd member whose etcd pod is crashlooping
include::modules/restore-replace-crashlooping-etcd-member.adoc[leveloffset=+2]

// Replacing an unhealthy baremetal stopped etcd member
include::modules/restore-replace-stopped-baremetal-etcd-member.adoc[leveloffset=+2]

[role="_additional-resources"]
.Additional resources
* xref:../../machine_management/deleting-machine.adoc#machine-lifecycle-hook-deletion-etcd_deleting-machine[Quorum protection with machine lifecycle hooks]