etcdctl 설치
ETCD_VER=v3.5.9 # 최신 버전 확인 후 필요 시 변경
# 다운로드 및 압축 해제
wget https://github.com/etcd-io/etcd/releases/download/${ETCD_VER}/etcd-${ETCD_VER}-linux-amd64.tar.gz
tar xvf etcd-${ETCD_VER}-linux-amd64.tar.gz
# 실행 파일을 /usr/local/bin으로 이동
sudo mv etcd-${ETCD_VER}-linux-amd64/etcdctl /usr/local/bin/
# 설치 확인
etcdctl version
v3.5.20 amd64 패키지
https://github.com/etcd-io/etcd/releases/download/v3.5.20/etcd-v3.5.20-linux-amd64.tar.gz
v3.5.20 arm64 (mac os) 패키지
https://github.com/etcd-io/etcd/releases/download/v3.5.20/etcd-v3.5.20-linux-arm64.tar.gz
etcd 멤버 확인
export ETCDCTL_API=3
export ENDPOINTS="https://127.0.0.1:2379"
export CERT_PATH="/etc/kubernetes/pki/etcd"
export ETCDCTL_CACERT="${CERT_PATH}/ca.crt"
export ETCDCTL_CERT="${CERT_PATH}/peer.crt"
export ETCDCTL_KEY="${CERT_PATH}/peer.key"
etcdctl member list
etcd 리더 확인
export ETCDCTL_API=3
export ENDPOINTS="https://127.0.0.1:2379"
export CERT_PATH="/etc/kubernetes/pki/etcd"
export ETCDCTL_CACERT="${CERT_PATH}/ca.crt"
export ETCDCTL_CERT="${CERT_PATH}/peer.crt"
export ETCDCTL_KEY="${CERT_PATH}/peer.key"
etcdctl endpoint status --write-out=table