With this article I would like to start a series of posts with the aim of introducing Kubernetes open source tools in under 3 min. The ecosystem around K8S is becoming more and more complex and it is quite difficult to follow the trail of great projects that arise everyday.

That is not an excuse anymore! In every post I will provide a Helm chart to automatically deploy the tool in the cluster (either mine or from another author), and a brief guide to kickstart the adoption of the tool.

I have got only 3 minutes so let’s start with the first post: Heptio Ark

Ark is an open source software created by Heptio to easily manage backups and restores of a whole Kubernetes cluster. That includes resource definitions and also persistent volumes.

A Helm Chart to deploy it with just one command is available in GitHub: https://github.com/nachomillangarcia/helm-chart-ark. You will also need to install the command-line tool in your computer. For Linux users:

wget https://github.com/heptio/ark/releases/download/v0.8.1/ark-v0.8.1-linux-amd64.tar.gz

tar -xvzf ark-v0.8.1-linux-amd64.tar.gz

sudo mv ark /usr/local/bin/

Checkout the releases page for binaries for OSX and Windows

Ark consists of a controller (server) and several custom resource definitions that represent backups, restores and schedules.

Backups can be stored in multiple backends (S3, GC Storage, Azure Storage…). They are just a .tar.gz containing JSONs for every resource in the cluster (or just for the resources you’ve selected at the creation of the backup).

The best comes from its ability to also create snapshots of your persistent volumes in AWS, GC and Azure. Just magic, no other tool needed to have all your data safe!

Let’s see how to create a backup:

ark backup create my-backup-all-cluster

This will create one for every resource on the cluster, including persistent volumes.

You can restrict to some namespace, resource type or labels. It is important to know that Ark doesn’t allow to select by name, just by labels, so now is a good moment to start labeling everything ;)

ark backup create my-backup-hello --selector app=hello

This will backup only the components labeled with app=hello. Check the command help for a full list of options.

Finally, to restore a backup just create a restore object:

ark restore create --from-backup my-backup-hello

It’s important to note that the restores never overwrite anything, there is no risk in executing that.

There are lot of further commands and options for listing and inspecting backups and restores, creating schedules, checking logs, etc. But I’ll let you discover them by yourself: https://heptio.github.io/ark/v0.8.1/

Let me know if you didn’t know about Heptio Ark before and if you’ve enjoyed it!

ignaciomillan.com