Running a RethinkDB cluster on Kubernetes.
- Super simple - no configuration required
- Runs cluster as a
StatefulSet
which prevents data loss when the cluster unexpectedly shuts down - Automatic peer discovery using the Kubernetes service
To create the RethinkDB cluster run this command:
kubectl create -f https://raw.githubusercontent.com/lucacasonato/rethinkdb-kubernetes/v2.4.0/cluster.yaml
This will set up all of the required Kubernetes resources. You can now use the command below to view if your node is ready:
kubectl get sts rethinkdb-nodes
Your cluster is now ready for operation!
To scale the cluster up and down run this command:
kubectl scale sts rethinkdb-nodes --replicas 3
To view the RethinkDB admin panel you need to forward the port it is listening on to your computer. You can do this from any of the running RethinkDB nodes in the stateful set.
kubectl port-forward rethinkdb-nodes-0 8080
You can now visit http://localhost:8080
to view the admin panel.
Copyright (c) 2020 Luca Casonato
This project is licenced under the MIT licence. The full licence can be found in the LICENCE file.