1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-06 06:46:26 +01:00

Correcting etcd backup command for hosted cluster

The command is referencing the wrong CA cert /etc/etcd/tls/client/etcd-client.crt which doesn't exist in the pods and hence the execution fails. The actual CA cert to be used with etcdctl command is /etc/etcd/tls/etcd-ca/ca.crt.
This commit is contained in:
Alok Singh
2024-08-26 02:16:14 +05:30
committed by openshift-cherrypick-robot
parent dd36925dc8
commit 526d7ceed4

View File

@@ -33,7 +33,7 @@ $ oc scale deployment -n <hosted_cluster_namespace> --replicas=0 kube-apiserver
+
[source,terminal]
----
$ oc exec -it <etcd_pod_name> -n <hosted_cluster_namespace> -- env ETCDCTL_API=3 /usr/bin/etcdctl --cacert /etc/etcd/tls/client/etcd-client-ca.crt --cert /etc/etcd/tls/client/etcd-client.crt --key /etc/etcd/tls/client/etcd-client.key --endpoints=localhost:2379 snapshot save /var/lib/data/snapshot.db
$ oc exec -it <etcd_pod_name> -n <hosted_cluster_namespace> -- env ETCDCTL_API=3 /usr/bin/etcdctl --cacert /etc/etcd/tls/etcd-ca/ca.crt --cert /etc/etcd/tls/client/etcd-client.crt --key /etc/etcd/tls/client/etcd-client.key --endpoints=localhost:2379 snapshot save /var/lib/data/snapshot.db
----
. To check the snapshot status, use the `exec` command in each etcd container by running the following command: