반응형

 

1. etcdctl leader 및 list 조회 명령어 입력시 Error: context deadline exceeded 발생할 경우 cacert, cert, key를 입력해준다.

# 아래 명령어 중 하나 사용
etcdctl member list --cacert="/etc/kubernetes/pki/etcd/ca.crt" --cert="/etc/kubernetes/pki/etcd/peer.crt" --key="/etc/kubernetes/pki/etcd/peer.key"
etcdctl endpoint status --cluster --cacert="/etc/kubernetes/pki/etcd/ca.crt" --cert="/etc/kubernetes/pki/etcd/peer.crt" --key="/etc/kubernetes/pki/etcd/peer.key"
or
etcdctl member list --cacert="/etc/kubernetes/pki/etcd/ca.crt" --cert="/etc/kubernetes/pki/etcd/server.crt" --key="/etc/kubernetes/pki/etcd/server.key"
etcdctl endpoint status --cluster --cacert="/etc/kubernetes/pki/etcd/ca.crt" --cert="/etc/kubernetes/pki/etcd/server.crt" --key="/etc/kubernetes/pki/etcd/server.key"

 

 

2. etcdctl 사용시 open /etc/kubernetes/pki/etcd/ca.crt: permission denied 발생할 경우

kube-system의 etcd 버전과 맞춰준다.

cat /etc/kubernetes/manifests/etcd.yaml | grep image
# image: image: registry.k8s.io/etcd:3.5.9-0 
# 위 image 버전확인 후 etcdctl 다운
# https://github.com/etcd-io/etcd/releases
curl https://storage.googleapis.com/etcd/v3.5.9/etcd-v3.5.9-linux-amd64.tar.gz -o ./etcd-v3.5.9-linux-amd64.tar.gz
반응형

+ Recent posts