View profile

Raft in Kubernetes and Swarm Pt. 3: Backup the Raft

Bret Fisher
Bret Fisher
Pt.1 and 2 covered the Raft algorithm and cluster design, and today I’ll cover backing up your cluster database.

Annie The Raft from
Annie The Raft from
Backing Up Swarm
Since Swarm has a built-in Raft database (called Raft logs), this is cut and dry, you just need to backup everything in /var/lib/docker/swarm on a Manager node.
The negatives are that 1. That Manager’s Docker Engine should be stopped during file backups, which means you need to take steps to ensure the Swarm still has quorum while backups happen, and 2. There is no built-in way to automate this. You’ll need to create or find scripts/tools that do this outside a Docker container on a specific server, and then move those backups off-disk. Bummer.
Backing Up etcd For Kubernetes
Since etcd can be installed in all sorts of ways (hosted, in cluster containers, outside the cluster, or directly on hosts), this makes backups more complex and varied. The good news is Kubernetes has tools for making this easier.
Operating etcd clusters for Kubernetes
Using the etcd Backup Operator
Using CronJob's with the etcd Backup Operator
On The YouTube Show Last Week
What a fun show, talking about where Jenkins X, how it’s different from Jenkins (hint, it’s totally unrelated), and how to use it for proper Kubernetes GitOps (DevOps-style cluster updates using git).
Kubernetes GitOps with Jenkins X: DevOps and Docker Live Show (Ep 57)
Kubernetes GitOps with Jenkins X: DevOps and Docker Live Show (Ep 57)
Thanks, talk to ya next week,
Weekly YouTube Live:
Course Coupons:
Did you enjoy this issue? Yes No
Bret Fisher
Bret Fisher @bretfisher

Commentary on tools and techniques I find interesting around Docker, Kubernetes, Cloud Native DevOps, and DevSecOps.

In order to unsubscribe, click here.
If you were forwarded this newsletter and you like it, you can subscribe here.
Created with Revue by Twitter.
Bret Fisher, Virginia Beach, Virginia, USA