Menu

Encrypted and Backed-Up OpenShift etcd: Automated Snapshots, Restore, and Key Rotation
πŸ“°

Encrypted and Backed-Up OpenShift etcd: Automated Snapshots, Restore, and Key Rotation

DEV Community: kubernetesΒ·Florient DOGBEΒ·about 6 hours ago
#1Dgl1hJR
#devtokubernetes#devto#dev#etcd#backup
Long article (2470 words) β€” no AI summary yet.
Reading 0:00
15s threshold

etcd is the only stateful component of an OpenShift control plane, and it is the one most teams never test until the day they have to. Two problems compound each other: by default, Secret objects are stored in etcd in plaintext (base64 is not encryption), and most clusters rely on a backup procedure that exists only as a wiki page nobody has executed since installation day.

This article covers the complete loop: enabling at-rest encryption on the API server, automating cluster-backup.sh snapshots with a CronJob scheduled on control plane nodes, rehearsing a full restore in a lab, and understanding how encryption keys rotate β€” because a snapshot you cannot decrypt is not a backup.

Context: what an etcd snapshot actually contains

cluster-backup.sh produces two artifacts:

snapshot_<datetime>.db β€” a consistent etcd snapshot (every object in the cluster)

static_kuberesources_<datetime>.tar.gz β€” the static pod resources from /etc/kubernetes/static-pod-resources , including the etcd encryption keys when…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.