etcd
binary needs to be downloaded and run as a service on the master node. By default it listens on port 2379
.etcd
is automatically deployed as a static pod on the master node.etcdctl
utility can be used to interact with etcd
to get and put items in it.etcd
service will be running on each master node and will be communicating with each other on port 2380
. This can be configured in the etcd
config.etcdctl
Follow the release notes for any etcd
release to download and unzip the etcd
and etcdctl
binary from https://github.com/etcd-io/etcd/releases/. At the end, move the extracted binaries to /usr/local/bin
or /usr/bin
.
Backup a cluster’s ETCD
ETCDCTL_API=3 etcdctl \\
--cacert=/etc/kubernetes/pki/etcd/ca.crt \\
--cert=/etc/kubernetes/pki/etcd/server.crt \\
--key=/etc/kubernetes/pki/etcd/server.key \\
snapshot save <backup-filename>
Restore a cluster from an ETCD backup
ETCDCTL_API=3 etcdctl snapshot restore --data-dir="/var/lib/etcd-snapshot" <backup-filename>