Skip to content

Instantly share code, notes, and snippets.

@strigie
Created November 10, 2022 10:19
Show Gist options
  • Save strigie/ba56c70e178c7f28f85996b337fbc93a to your computer and use it in GitHub Desktop.
Save strigie/ba56c70e178c7f28f85996b337fbc93a to your computer and use it in GitHub Desktop.
Break into Openshift etcd
oc debug node/control2
chroot /host
source /etc/kubernetes/static-pod-resources/etcd-certs/configmaps/etcd-scripts/etcd.env
source /etc/kubernetes/static-pod-resources/etcd-certs/configmaps/etcd-scripts/etcd-common-tools
dl_etcdctl
export ETCDCTL_CACERT=$(echo ${ETCDCTL_CACERT} | sed -e "s|static-pod-certs|static-pod-resources/etcd-certs|")
export ETCDCTL_CERT=$(echo ${ETCDCTL_CERT} | sed -e "s|static-pod-certs|static-pod-resources/etcd-certs|")
export ETCDCTL_KEY=$(echo ${ETCDCTL_KEY} | sed -e "s|static-pod-certs|static-pod-resources/etcd-certs|")
etcdctl get --keys-only --prefix ""
@strigie
Copy link
Author

strigie commented Jan 17, 2023

oc adm release extract quay.io/openshift-release-dev/ocp-release:4.8.39-x86_64 --git=foo > /dev/null 2>&1 && cat foo/github.com/openshift/etcd/version/version.go | grep Version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment