NOTE: These proceedures are only for OpenShift SNO-Deployments. I will create a loop command later for multi-node environments.
❯ oc get pods -n openshift-etcd | grep etcd
etcd-itamae 4/4 Running 20 8d
ETCD_SNO_ENDPOINT=$(oc get pods -n openshift-etcd | grep etcd | awk '{print $1}')
echo $ETCD_SNO_ENDPOINT
ETCD_SNO_ENDPOINT=$(oc get pods -n openshift-etcd | grep etcd | awk '{print $1}')
oc rsh -n openshift-etcd $ETCD_SNO_ENDPOINT etcdctl endpoint status --cluster -w table
oc rsh -n openshift-etcd $ETCD_SNO_ENDPOINT
unset ETCDCTL_ENDPOINTS
etcdctl --command-timeout=30s --endpoints=https://localhost:2379 defrag
etcdctl endpoint status -w table --cluster
etcdctl alarm list
etcdctl alarm disarm
exit