Backup Candidated
Declarative File Backup
Backup - Resouce Configs
kubectl get all --all-namespaces -o yaml > all-deploy-services.yaml
Backup - ETCD
ETCDCTL_API=3 etcdctl \
snapshot save snapshot.db
$ ls
snapshot.db
ETCDCTL_API=3 etcdctl \
snapshot status snapshot.db
Restore - ETCD
$ service kube-apiserver stop
Service kube-apiserver stopped
ETCDCTL_API=3 etcdctl \
snapshot restore snapshot.db \
--data-dir /var/lib/etcd-from-backup
systemctl daemon-reload
$ service etcd restart
Service etcd restarted
$ service kube-apiserver start
Service kube-apiserver started
ETCDCTL_API=3 etcdctl \
snapshot save snapshot.db \
--endpoints=https://127.0.0.1:2379 \
--cacert=/etc/etcd/ca.crt \
--cert=/etc/etcd/etcd-server.crt \
--key=/etc/etcd/etcd-server.key
Backup Candidates
'CKA &. CKAD > Cluster Maintenance' 카테고리의 다른 글
Practice Test - Backup and Restore Methods (0) | 2021.03.28 |
---|---|
Working with ETCDCTL (0) | 2021.03.28 |
Kuberenetes Upgrade Process (0) | 2021.03.28 |
Operating system Upgrade (0) | 2021.03.28 |