• Stars
    star
    139
  • Rank 262,954 (Top 6 %)
  • Language
  • License
    MIT License
  • Created over 8 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

RethinkDB cluster on top of Kubernetes made easy.

RethinkDB Cluster for Kubernetes

MIT Licensed by Ross Kukulinski @RossKukulinski

Docker image can be found here.

Overview

This repository contains Kubernetes configurations to easily deploy RethinkDB. The quickstart provides a non-persistent disk configuration for development and testing. There is also a GKE / GCE configuration which supports persistent volume backed replicas.

By default, all RethinkDB Replicas are configured with Resource Limits and Requests for:

  • 256Mi memory
  • 100m cpu

In addition, RethinkDB Replicas are configured with a 100Mi cache-size. All of these settings can be tuned for your specific needs.

Background

This is based on the original work in github.com/kubernetes/kubernetes, but has been adapted to utilize newer versions of RethinkDB (2.3+) as well as supporting proxies.

It's important to note that the default admin interface IS exposed via public LoadBalancer. This is for demonstration purposes only. I would recommend changing the admin service to type: ClusterIP and use a TLS & password protected proxy (like nginx) to publicly expose the admin interface.

New to Kubernetes?

  1. Create a project on https://console.cloud.google.com
  2. Set gcloud to your project gcloud config set <project-name>
  3. Create a cluster via the Console: Compute > Container Engine > Container Clusters > New container cluster. Leaving all other options default - You should get a Kubernetes cluster with three nodes, ready to receive your container image.
  4. Set gcloud to point to your container - gcloud container clusters get-credentials --zone <cluster-zone> <cluster-name>

Quickstart without persistent storage

Launch Services and Deployments

kubectl apply -f rethinkdb-rbac.yaml
kubectl apply -f rethinkdb-quickstart.yml

Once Rethinkdb pods are running, access the Admin service

kubectl describe service rethinkdb-admin

To find the external IP to connect to, locate at the EXTERNAL-IP column under the rethinkdb-driver row after running

kubectl get service

Scale up the number of Rethinkdb replicas

kubectl scale deployment/rethinkdb-replica --replicas=5

Observe your pods

kubectl get pods

Due to the way persistent volumes are handled in Kubernetes, we have to have one RC per replica, each with its own persistent volume. The RC is used to create a new pod should there be any issues.

This assumes you have created three persistent volumes in GKE: rethinkdb-storage-1 rethinkdb-storage-2 rethinkdb-storage-3

Create the RethinkDB Services and first replica

kubectl create -f rethinkdb-services.yml
kubectl create -f rethinkdb-replica.1.yml

Wait for first replica to come up before launching the other replicas

kubectl create -f rethinkdb-replica.2.yml
kubectl create -f rethinkdb-replica.3.yml
kubectl create -f rethinkdb-proxy.yml
kubectl create -f rethinkdb-admin.yml

More Repositories

1

k8s-scripts

Opinionated scripts for managing application deployment lifecycle in Kubernetes
Shell
86
star
2

nginx-kubernetes-reload

Containerized NGINX that watches for configuration file changes from Kubernetes Secrets or ConfigMaps.
Dockerfile
48
star
3

Introduction_To_CoreOS

Example files for my Introduction to CoreOS O'Reilly Video Tutorial Series
JavaScript
22
star
4

hazel-rules

Some of my useful hazel rules
20
star
5

n2n-docker

Need to Node: Getting started with Node.JS, Docker, and Kubernetes
Shell
19
star
6

kubernetes-101-for-devs

Up and running with Kubernetes
Makefile
14
star
7

lynx-express

Express Middleware for sending data to StatsD
JavaScript
11
star
8

rethinkdb-kubernetes

Shell
8
star
9

ghost-ansible

Ansible playbooks for deploying the Ghost blogging system
Shell
5
star
10

k8s-resources

Shell
4
star
11

rethinkdb-gcloud-backup

Container for backup/restore of rethinkdb to gcloud
Shell
4
star
12

getting-mean-with-ansible

Code & Slides for Deploying a MEAN stack application to Digital Ocean using Ansible
JavaScript
4
star
13

talk-statsd

BayNode Meetup talk on StatsD/Graphite
JavaScript
3
star
14

ptw16_node

JavaScript
2
star
15

kongair-konnect

Kong Konnect APIOps Repo for my KongAir
Shell
2
star
16

iojs_talk

Talk on the emergence of IOJS and what it means to the NodeJS community
JavaScript
2
star
17

ansible-ghost

Ansible playbooks for deploying Ghost
JavaScript
2
star
18

fly-dp

Shell
1
star
19

jenkins-nodejs-k8s-worker

Jenkins Kubernetes worker with kubectl, jq, make, k8s, and NodeJS
1
star
20

dockerfiles

My Dockerfiles based on jessfraz's repo structure
Shell
1
star
21

ghost-google-cloud-storage

JavaScript
1
star
22

jenkins-maven-k8s-worker

1
star
23

kukulinski-com-themes

CSS
1
star
24

konnect-sh-api

Unofficial examples for interacting with Service Hub APIs for doc & OAS management
Shell
1
star
25

nodejs-conference-cfps

Curated list of upcoming conference CFPs
1
star