๋ํ์ ์ธ ๋ฌธ์ ๋ก ์ฟ ๋ฒ๋คํฐ์ค์ ๋ชจ๋ ๋ฐ์ดํฐ๊ฐ ๋ชจ์ฌ ์๋ etcd๋ฅผ ๋ฐฑ์ ํ๊ณ
์ ์ ๋ฐฑ์ ํ ๋ฐ์ดํฐ๋ก ๋๋๋ฆฌ๋ ์์ ์ด๋ค.
์ฟ ๋ฒ๋คํฐ์ค ๋ฌธ์
Operating etcd clusters for Kubernetes
etcd is a consistent and highly-available key value store used as Kubernetes' backing store for all cluster data. If your Kubernetes cluster uses etcd as its backing store, make sure you have a back up plan for those data. You can find in-depth information
kubernetes.io
https://www.youtube.com/watch?v=dv_5WCYS5P8
๊ธฐ๋ณธ etcd์ ๊ฒฝ๋ก์ด๋ค
/var/lib/etcd
๋ค์ ๋ช ๋ น์ด๋ฅผ ํตํด ํ์ฌ etcd์ ์ํ๋ฅผ ์ ์ฅํ ์ ์๊ณ
Sudo ETCDCTL_API=3 etcdctl \
--endpoints=https://127.0.0.1:2379 \
--cacert=<trusted-ca-file>
--cert=<cert-file> --key=<key-file> \
snapshot save <backup-file-location>
๋ค์ ๋ช ๋ น์ด๋ฅผ ํตํด snapshot๋ฅผ ๋๋ ํ ๋ฆฌ์ ํ๊ฒ ๋๊ณ
sudo ETCDCTL_API=3 etcdctl \
--data-dir <data-dir-location> \
snapshot restore snapshotdb
etcd๋ฅผ ๊ด๋ฆฌํ๋ Pod์ Yaml ํ์ผ ์์น
/etc/kubernetes/manifests/etcd.yaml
-hostPath:
path : ~~~~
๋ฅผ ์์ ํ๊ฒ ํ๊ฒ ๋๋ฉด etcd Pod Static ์ด๊ธฐ์ restart๋ฅผ ์๋์ ์ผ๋ก ํ ํ, ์ ์ฉ์ด ๋๋ค
'๐ Backend' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
CKA ํฉ๊ฒฉ ํ๊ธฐ (0) | 2023.07.30 |
---|---|
k8s - CKA ์ํ ๋ฑ๋ก (์ฌ์ด๋ฒ ๋จผ๋ฐ์ด) (0) | 2022.12.04 |
k8s - Udemy Voting-app-worker m1 ์๋ฌ (0) | 2022.08.15 |
k8s - Absolute Beginner ํ์ถ๊ธฐ (0) | 2022.08.15 |
k8s - m1, minikube, hello-minikube localhost ์ ์ ๋ถ๊ฐ (0) | 2022.08.13 |