#15 on Fast Company’s Best Workplaces for Innovators List – Learn more

KubeRBS for automatic Kubernetes rollbacks so you can sleep better at night!

1 6tl05dq4o03gbdcptwwx8q

With the massive adoption of Kubernetes and the fact the continuous delivery has become a standard practice, the rollout of new versions is now more automated than ever. But what happens if you deploy a faulty version? How much time and effort it will take to rollback to the previous, non-faulty version?

kuberbs (Kubernetes Rollback System) is an attempt to solve this problem by monitoring your Kubernetes deployments and if your error rate (user-defined metrics) is above a threshold then the deployment will be rolled back to the previous version.

Right now, kuberbs supports Stackdriver and Datadog metrics as an indicator of error-rate. We are also planning to add more integrations with other monitoring systems as well.

kuberbs is written in Go and it is running as a pod inside your GKE cluster’s kube-system namespace without any modification to the cluster itself.

kuberbs uses CRD (Custom Resource Definition) and acts as Operator to manage the configuration which deployments to monitor, what are the metrics and what are the thresholds.

apiVersion: "doit.com/v1"
kind: Rbs
name: my-rbs-example
watchperiod: 5
metricssource: stackdriver
  - name: default
    - deployment:
name: hello-kubernetes-app
#Stack driver metric
metric: logging.googleapis.com/user/hello-kubernetes-app-errors
threshold: 1
    - deployment:
name: kubernetes-app-2
# DataDog metric
metric: gcp.container.cpu.usage_time{*}
threshold: 85
  - name: kube-system
    - deployment:
name: kube-dns
metric: logging.googleapis.com/user/dig
threshold: 30

The configuration is done via environment variables which are exposed in a kuberbs’s ConfigMap.

apiVersion: v1
  KUBERBS_DEBUG: "false"
kind: ConfigMap
app: kuberbs
name: kuberbs-config
namespace: kube-system

You can see KubeRBS in action in this short video:

It’s still early days for kuberbs and we have big plans for it. If you’d like to be involved and contribute, we are actively seeking for contributors to help us to improve it and cover more use-cases.

Want more stories? Check our blog, or follow Aviv on Twitter.

Subscribe to updates, news and more.