Giter Site home page Giter Site logo

slcraciun / scalable-elassandra-deployment-on-kubernetes Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mdoulaty/scalable-elassandra-deployment-on-kubernetes

0.0 1.0 0.0 10 KB

Scalable Kubernetes based deployment of Elassandra using statefulsets

License: Apache License 2.0

scalable-elassandra-deployment-on-kubernetes's Introduction

Scalable multi-node Elassandra deployment on Kubernetes Cluster

This recipe is mostly based on this repository, but it is modified for Elassandra. It uses statefulsets for storing data persistantly and it is easy to scale up and down!

It is assumed that you are already familiary with Cassandra, EalsticSearch and Kubernetes and you have a working Kubernetes cluster.

tldr;

$ kubectl create -f elassandra-service.yaml
$ kubectl create -f local-volumes.yaml
$ kubectl create -f elassandra-statefulset.yaml

Elassandra service

First the Elassandra service is defined and the relevant ports are exposed:

$ kubectl -f elassandra-service.yaml

Check to verify the service is created:

$ kubectl get svc elassandra

Local volumes

Then the local volumes are created:

$ kubectl create -f local-volumes.yaml

To verify it:

$ kubectl get pv

Statefulsets

Then the pods are created using the statefulset definition:

$ kubectl create -f elassandra-statefulset.yaml

And to verify the statefulset:

$ kubectl get statefulsets

Scaling up and down

With this sample script, only three persistant volumes are created - so if you want to scale to more than three pods, first create the pvs accordingly.

$ kubectl scale statefulset elassandra --replicas=3

And to verify the state of the statefulset:

$ kubectl get statefulsets

Accessing the cluster

Assuming that the default namespace was used, the service is accessible via elassandra.svc.default.cluster.local

Checking Cassandra nodes:

$ kubectl exec -ti elassandra-0 nodetool status

Checking ElasticSearch status:

$ curl http://elassandra.svc.default.cluster.local:9200

scalable-elassandra-deployment-on-kubernetes's People

Contributors

mdoulaty avatar

Watchers

 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.