mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
55 lines
1.4 KiB
Plaintext
55 lines
1.4 KiB
Plaintext
// Module included in the following assembly:
|
|
//
|
|
// * hosted_control_planes/hcp_high_availability/hcp-recovering-etcd-cluster.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="hcp-recover-failing-etcd-pods_{context}"]
|
|
= Recovering a failing etcd pod
|
|
|
|
Each etcd pod of a 3-node cluster has its own persistent volume claim (PVC) to store its data. An etcd pod might fail because of corrupted or missing data. You can recover a failing etcd pod and its PVC.
|
|
|
|
.Procedure
|
|
|
|
. To confirm that the etcd pod is failing, enter the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc get pods -l app=etcd -n openshift-etcd
|
|
----
|
|
+
|
|
.Example output
|
|
[source,terminal]
|
|
----
|
|
NAME READY STATUS RESTARTS AGE
|
|
etcd-0 2/2 Running 0 64m
|
|
etcd-1 2/2 Running 0 45m
|
|
etcd-2 1/2 CrashLoopBackOff 1 (5s ago) 64m
|
|
----
|
|
+
|
|
The failing etcd pod might have the `CrashLoopBackOff` or `Error` status.
|
|
|
|
. Delete the failing pod and its PVC by entering the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc delete pods etcd-2 -n openshift-etcd
|
|
----
|
|
|
|
.Verification
|
|
|
|
* Verify that a new etcd pod is up and running by entering the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc get pods -l app=etcd -n openshift-etcd
|
|
----
|
|
+
|
|
.Example output
|
|
[source,terminal]
|
|
----
|
|
NAME READY STATUS RESTARTS AGE
|
|
etcd-0 2/2 Running 0 67m
|
|
etcd-1 2/2 Running 0 48m
|
|
etcd-2 2/2 Running 0 2m2s
|
|
----
|