Git Product home page Git Product logo

cassandra-operator's Introduction

Cassandra operator

Build CircleCI

Project status: alpha

Major planned features have yet to be completed and API changes are currently planned, we reserve the right to address bugs and API changes in a backwards incompatible way before the project is declared stable. See upgrade guide for safe upgrade process.

Currently user facing Cassandra cluster objects are created as Kubernetes Custom Resources, however, taking advantage of User Aggregated API Servers to improve reliability, validation and versioning may be undertaken. The use of Aggregated API should be minimally disruptive to existing users but may change what Kubernetes objects are created or how users deploy the operator.

We expect to consider the Cassandra operator stable soon; backwards incompatible changes will not be made once the project reaches stability.

Overview

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

There are more spec examples on setting up clusters with backup, restore, and other configurations.

Read Best Practices for more information on how to better use Cassandra operator.

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.

Read Backup and Restore Guide for backing up and restoring Cassandra clusters managed by the operator.

See the Resources and Labels doc for an overview of the resources created by the Cassandra-operator.

Requirements

  • Kubernetes 1.8+
  • Cassandra 3.11+

Deploy Cassandra operator

See instructions on how to install/uninstall Cassandra operator .

Create and destroy an Cassandra cluster

$ kubectl create -f example/common/test.yaml

A 3 member Cassandra cluster will be created.

$ kubectl get pods
NAME                                    READY     STATUS    RESTARTS   AGE
cassandra-operator7-5d58bc7874-t85dt    1/1       Running   0          18h
test-dc-0                               1/1       Running   0          1m
test-dc-1                               1/1       Running   0          1m
test-dc-2                               1/1       Running   0          1m

See client service for how to access Cassandra clusters created by operator.

Destroy Cassandra cluster:

$ kubectl delete -f example/common/test.yaml

Resize an Cassandra cluster

Create an Cassandra cluster, if you haven't already:

$ kubectl apply -f example/common/test.yaml

In example/common/test.yaml the initial cluster size is 3. Modify the file and change replicas from 3 to 5.

apiVersion: stable.instaclustr.com/v1
kind: CassandraDataCenter
metadata:
  name: test-dc
spec:
  replicas: 5
  image: "gcr.io/cassandra-operator/cassandra:latest"

Apply the size change to the cluster CR:

$ kubectl apply -f example/common/test.yaml

The Cassandra cluster will scale to 5 members (5 pods):

$ kubectl get pods
NAME                            READY     STATUS    RESTARTS   AGE
test-dc-0                       1/1       Running   0          1m
test-dc-1                       1/1       Running   0          1m
test-dc-2                       1/1       Running   0          1m
test-dc-3                       1/1       Running   0          1m
test-dc-4                       1/1       Running   0          1m

Similarly we can decrease the size of cluster from 5 back to 3 by changing the size field again and reapplying the change.

apiVersion: stable.instaclustr.com/v1
kind: CassandraDataCenter
metadata:
  name: test-dc
spec:
  replicas: 3
  image: "gcr.io/cassandra-operator/cassandra:latest"

Then apply the changes

$ kubectl apply -f example/common/test.yaml

Limitations

  • This operator is currently a work in progress and breaking changes are landing in master all the time until we reach our initial release. Here be dragons!
  • Do not use this in production... yet
  • Please see the Instaclustr supported projects page for the Enterprise support status of the Cassandra Operator.

cassandra-operator's People

Contributors

ameyb avatar bbromhead avatar benbromhead avatar lyubentt avatar mavimo avatar slater-ben avatar temujin9 avatar xek avatar zegelin avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.