Write operators for databases in Kubernetes with KubeDB
Running production quality databases in Kubernetes can be quite a hassle. But KubeDB promises to solve all your problems. Let’s have a quick look at this framework.
You can count on KubeDB to solve your problems when running production quality databases in Kubernetes.
KubeDB is a framework for writing operators for any database that support certain requirements. Namely:
- Create a database declaratively using CRD.
- Take one-off backups or period backups to various cloud stores, eg, S3, GCS, etc.
- Restore from backup or clone any database.
- Native integration with Prometheus for monitoring via CoreOS Prometheus Operator.
- Apply deletion lock to avoid accidental deletion of database.
- Keep track of deleted databases, cleanup prior snapshots with a single command.
- Use cli to manage databases like kubectl for Kubernetes.
Currently, KubeDB supports the following databases:
- MySQL / MariaDB / Percona Server for MySQL
The concept is quite simple: you only need to describe the desired database configuration in an Elasticsearch, Postgres or any of the supported databases object and the KubeDB operator will create Kubernetes objects in the desired state for you.
Head over to the official documentation for further information on this framework.
SEE ALSO: “As Kubernetes becomes the standard, we will continue to see an expansion of the ecosystem built on it”
You need to follow two steps in order to install KubeDB. First off, you need to install a Kubernetes operator in your cluster using scripts or via Helm and download kubedb cli on your workstation. You can also use kubectl cli with KubeDB custom resource objects.
Check out the installation guide for detailed instructions.