_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN
Let's talk

Kubernetes Backup a Disaster Recovery

11. 05. 2022 1 min read intermediate

Cloud Intermediate

Kubernetes Backup a Disaster Recovery

KubernetesBackupDisaster RecoveryVelero 5 min read

Strategie zálohování a obnovy Kubernetes clusterů. Velero, etcd backup, PV snapshots a DR plány.

Co Zálohovat

  • etcd — cluster state (nejkritičtější)
  • Kubernetes manifesty — Deployments, Services, ConfigMaps, Secrets
  • Persistent Volumes — data aplikací
  • Custom Resources — CRDs a jejich instance

Velero

# Instalace
velero install \
  --provider aws \
  --bucket velero-backups \
  --secret-file ./credentials \
  --plugins velero/velero-plugin-for-aws:v1.9.0

# Záloha
velero backup create full-backup --include-namespaces '*'

# Scheduled backup
velero schedule create daily-backup \
  --schedule="0 2 * * *" \
  --ttl 720h

etcd Backup

ETCDCTL_API=3 etcdctl snapshot save /backup/etcd-snapshot.db \
  --endpoints=https://127.0.0.1:2379 \
  --cacert=/etc/kubernetes/pki/etcd/ca.crt \
  --cert=/etc/kubernetes/pki/etcd/server.crt \
  --key=/etc/kubernetes/pki/etcd/server.key

# Restore
ETCDCTL_API=3 etcdctl snapshot restore /backup/etcd-snapshot.db \
  --data-dir=/var/lib/etcd-new

Summary

Backup a DR strategie jsou kritické pro produkční Kubernetes. Velero pro manifesty a PV, etcd snapshoty pro cluster state. Pravidelně testujte restore!

Need Help with Implementation?

Our team has experience designing and implementing modern architectures. We’re happy to help.

Free Consultation

Share:

CORE SYSTEMS tým

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.