쿠버네티스 일반/Kasten

Kasten - Kubernetes 백업 및 복구 Demo

Jerry_이정훈 2021. 8. 5. 13:29
728x90

내일과 다,다음 주 Kasten 데모가 있습니다. 해당 시간에 사용할 Demo 시나리오입니다. Kubernetes 백업에 관심 있으시면 분들에게 도움이 도었으면 합니다.

 

Kasten 또는 Kubernetes 관련 문의 사항이 있으시면 언제든지 연락 부탁 드립니다.

 

Kasten 및 Kubernetes 기술 및 사업 문의 : leejunghoon@spkr.co.kr

Veeam 회사 소개

  • Leader in 가트너 매직 쿼드런트

 

Kasten 설치 

  • helm 기반 설치
    : 쉽고 빠르게 설치 가능
helm install k10 kasten/k10 --namespace=kasten-io

 

  • 고유 kasten-io namespace 에 POD 실행 
[spkr@erdia22 ~ (ubuns:kasten-io)]$ k get pod -n kasten-io -o wide
NAME                                  READY   STATUS    RESTARTS   AGE     IP              NODE       NOMINATED NODE   READINESS GATES
aggregatedapis-svc-6854dff8b6-8k45m   1/1     Running   0          6d19h   10.233.104.60   ubun20-1   <none>           <none>
auth-svc-6bb9548cd4-sd94p             1/1     Running   0          6d19h   10.233.104.61   ubun20-1   <none>           <none>
catalog-svc-57cc69c8cd-h627w          2/2     Running   0          6d19h   10.233.104.65   ubun20-1   <none>           <none>
config-svc-6f6dd7544b-pvjbc           1/1     Running   0          6d19h   10.233.66.91    ubun20-2   <none>           <none>
crypto-svc-ddf87d46d-qpv6h            2/2     Running   0          6d19h   10.233.66.88    ubun20-2   <none>           <none>
csi-snapshotter-0                     3/3     Running   0          6d19h   10.233.104.59   ubun20-1   <none>           <none>
dashboardbff-svc-7b7596ffb8-lnz4b     1/1     Running   0          6d19h   10.233.66.90    ubun20-2   <none>           <none>
executor-svc-6dbff96775-8d6gs         2/2     Running   0          6d19h   10.233.104.62   ubun20-1   <none>           <none>
executor-svc-6dbff96775-mtpxf         2/2     Running   0          6d19h   10.233.66.93    ubun20-2   <none>           <none>
executor-svc-6dbff96775-pdppz         2/2     Running   0          6d19h   10.233.104.64   ubun20-1   <none>           <none>
frontend-svc-55474fbcbb-lb5vm         1/1     Running   0          6d19h   10.233.66.92    ubun20-2   <none>           <none>
gateway-5f78676867-6gntr              1/1     Running   0          6d19h   10.233.104.63   ubun20-1   <none>           <none>
jobs-svc-569dfcb68f-wmjgn             1/1     Running   0          6d19h   10.233.66.94    ubun20-2   <none>           <none>
kanister-svc-798cfdb9bb-gs4xg         1/1     Running   0          6d19h   10.233.66.87    ubun20-2   <none>           <none>
logging-svc-76794f4548-kxkh4          1/1     Running   0          6d19h   10.233.66.95    ubun20-2   <none>           <none>
metering-svc-798c4dcb58-4tdpw         1/1     Running   0          6d19h   10.233.66.96    ubun20-2   <none>           <none>
prometheus-server-6d88bf8676-lfp4k    2/2     Running   0          6d19h   10.233.94.73    ubun20-3   <none>           <none>
state-svc-6d9b49d878-xl59n            1/1     Running   0          6d19h   10.233.66.89    ubun20-2   <none>           <none>

 

  • 직관적인 Admin GUI

백업 데모

  • 신규 백업 정책 생성
    : 모든 작업은 GUI 기반으로 직관적으로 수행 가능

  • 백업 수행 시간,  보관 주기 설정
    : 시간/일/주/월/연 단위 설정
    : Daily 백업, 1주일 보관 등 보관 기간 설정



  • 백업 대상 Application은 Namespace 또는 Label 단위 선택 

  • 백업 대상 Object
    : configmap, secret, pvc, deployment 등 namespace 내 전체 object 백업 또는 일부 Object만 선택 가능

 

  • Storage Class Snapshot 기반 백업 생성
    : 백업이 완료되면 해당 PVC에 대한 Snapshot 생성됨
[spkr@erdia22 ~ (ubuns:wordpress)]$ k get volumesnapshot
NAME                            READYTOUSE   SOURCEPVC        SOURCESNAPSHOTCONTENT                                                        RESTORESIZE   SNAPSHOTCLASS
 SNAPSHOTCONTENT                                                              CREATIONTIME   AGE
k10-csi-snap-5jbqbmb27wwk9kkq   true         wp-pv-claim                                                                                   20Gi          csi-rbdplugin-snapclass
 snapcontent-e8500752-96ba-4cf3-8fb2-ad3fd6ade626                             6d2h           6d2h
k10-csi-snap-8rhrgkclbq7ht95n   true         mysql-pv-claim                                                                                20Gi          csi-rbdplugin-snapclass
 snapcontent-11c50281-44a7-4d71-97c5-decf7edca3ab                             3d2h           3d2h
k10-csi-snap-92794xpgbmw2q8zm   true         mysql-pv-claim                                                                                20Gi          csi-rbdplugin-snapclass
 snapcontent-8fa0fb80-679e-4325-9659-5e3e36ce6326                             126m           126m
(생략)

 

  • volumesnapshotclass 이용
[spkr@erdia22 ~ (ubuns:prometheus)]$ k get volumesnapshotclasses.snapshot.storage.k8s.io
NAME                                DRIVER                       DELETIONPOLICY   AGE
csi-rbdplugin-snapclass             rook-ceph.rbd.csi.ceph.com   Delete           6d17h
k10-clone-csi-rbdplugin-snapclass   rook-ceph.rbd.csi.ceph.com   Retain           6d17h

 

  • 백업/복구 시간 대시보드 확인
    : snapshot 기반으로 1분 이내 빠르게 수행 완료

Application 복구

  • 대상 Application 선정, 복구 지점 선택
  • 복구 작업 실행
    기존 pod, pvc 종료 후 신규 pod, pvc 생성



 

  • 복구 완료 후 정상적으로 Application 서비스 가능(Wordpress 블로그 서비스)

 

  • 복구 대상 Object 선택
    : pv 데이터만 또는 전체 Object 선택 가능

 

  • 동일 혹은 다른 namespace 선택 가능

원격 스토리지 설정

  • 원격 DR Kube Cluster(또는 public cloud) 복구를 위한 스토리지 설정 

 

Export/Import to Remote Kubernetes Cluster

 

반응형