Skip to content

aslanbakirov/cassandra-operator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cassandra Operator

Disclaimer: This is my side project to learn/experiment and apply all features of Custom Resource Definitions, stateful applications and related technologies in Kubernetes. It is under active development, can be beneficial to be used as template for cassandra operator design

Project Overview

The Cassandra operator manages Cassandra clusters deployed to Kubernetes and automates tasks related to operating an Cassandra cluster.

  • Create and destroy
  • [Backup and restore a cluster] (Not implemented)
  • [Rolling upgrade](Not implemented)

Read RBAC docs for how to setup RBAC rules for Cassandra operator if RBAC is in place.

Read Developer Guide for setting up development environment if you want to contribute.

Requirements

  • Kubernetes 1.8+
  • Cassandra 3.11+

Deploy Cassandra operator

kubectl create -f example/example-cassandra-operator.yaml

This is a deployment for operator itself. It will create a custrom resource called cassandraclusters.cassandra.database.com which will enable us to create cassandracluster objects/resources

Create and destroy an Cassandra cluster

$ kubectl create -f example/example-cassandra-cluster.yaml

I included some cassandra config in example/example-cassandra-cluster.yaml file, but these are just examples to show how you can set them. Obviously, you can use your cassandra image for your projects.

A 3 member Cassandra cluster will be created.

$ kubectl get pods
NAME                            READY     STATUS    RESTARTS   AGE
cassandra-0       1/1       Running   0          1m
cassandra-1       1/1       Running   0          1m
cassandra-2       1/1       Running   0          1m

Destroy Cassandra cluster:

$ kubectl delete -f example/example-cassandra-cluster.yaml

About

cassandra operator creates/configures/manages cassandra clusters atop Kubernetes

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published