How to backup etcd on a Kubernetes cluster created with kubeadm - rpc error: code = 13

后端 未结 2 712
生来不讨喜
生来不讨喜 2021-02-10 14:57

I have a K8s cluster created with kubeadm that consists of a master node and two workers.

I am following this documentation article regarding the etcd backup: https://ku

2条回答
  •  生来不讨喜
    2021-02-10 15:42

    You can also check the Etcd configuration file in the following line on a node that Etcd is running.

    /etc/kubernetes/manifests/etcd.yaml

    After getting the command in the command section of the Etcd configuration,

    ETCDCTL_API=3 etcdctl --endpoints https://127.0.0.1:2379 --cacert=/etc/kubernetes/pki/etcd/ca.crt --cert=/etc/kubernetes/pki/etcd/healthcheck-client.crt --key /etc/kubernetes/pki/etcd/healthcheck-client.key
    

    you can run Etcd commands like below commands.

    ETCDCTL_API=3 etcdctl --endpoints https://127.0.0.1:2379 --cacert=/etc/kubernetes/pki/etcd/ca.crt --cert=/etc/kubernetes/pki/etcd/healthcheck-client.crt --key /etc/kubernetes/pki/etcd/healthcheck-client.key member list
    ETCDCTL_API=3 etcdctl --endpoints https://127.0.0.1:2379 --cacert=/etc/kubernetes/pki/etcd/ca.crt --cert=/etc/kubernetes/pki/etcd/healthcheck-client.crt --key /etc/kubernetes/pki/etcd/healthcheck-client.key snapshot save ./snapshot.db  
    ETCDCTL_API=3 etcdctl --endpoints https://127.0.0.1:2379 --cacert=/etc/kubernetes/pki/etcd/ca.crt --cert=/etc/kubernetes/pki/etcd/healthcheck-client.crt --key /etc/kubernetes/pki/etcd/healthcheck-client.key snapshot status ./snapshot.db
    

提交回复
热议问题