Getting Started
CassKop uses the standard Cassandra image (tested up to Version 3.11), and can run on Kubernetes 1.13.3+.
As a pre-requisite it needs :
- kubectl version v1.13.3+.
- Helm version v3.
- Access to a Kubernetes v1.13.3+ cluster.
- Cassandra needs fast local storage (we have tested with local storage provisioner, GKE ssd storage, and Rancher local-path-provisioner). Fast remote storage should work but is not tested yet.
CassKop deployment
Kubernetes preparation
First, we need to create a namespace
in order to host our operator & cluster (here we call it cassandra)
kubectl create namespace cassandra
Installing CassKop with Helm 3
You can (should) deploy CassKop using this Helm 3 chart:
helm install casskop oci://ghcr.io/cscetbon/casskop-helm
You can find more information in the Customizable install with helm.
If you have problem you can see Troubleshooting section
Deploy a Cassandra cluster
Deploy a ConfigMap
Before we can deploy our cluster, we need to create a configmap. This configmap will enable us to customize Cassandra's behaviour. More details on this can be found here
But for our example we will use the simple example:
kubectl apply -f config/samples/cassandra-configmap-v1.yaml
Deploy CassandraCluster resource
Once the operator is deployed inside a Kubernetes cluster, a new API will be accessible, so you'll be able to create, update and delete cassandraclusters.
In order to deploy a new cassandra cluster a specification has to be created. As an example :
kubectl apply -f config/samples/cassandracluster.yaml
Monitoring
We can quickly setup monitoring for our deployed Cassandra nodes using Prometheus operator.
Deploy Prometheus
You can deploy the CoreOs Prometheus operator on your cluster: You can find example helm value.yaml to configure the Prometheus operator:
kubectl create namespace monitoring
helm install --namespace monitoring prometheus-monitoring stable/prometheus-operator \
--set prometheusOperator.createCustomResource=false \
--set grafana.image.tag=7.0.1 \
--set grafana.plugins="{briangann-gauge-panel,grafana-clock-panel,grafana-piechart-panel,grafana-polystat-panel,savantly-heatmap-panel,vonage-status-panel}"
Add ServiceMonitor for Cassandra
Then you have to create ServiceMonitor objects to monitor Cassandra nodes and CassKop. You can update this to specify
which namespace to monitor (Your namespace need to be listed in the namespaceSelector
section.)
kubectl apply -f monitoring/servicemonitor/
Add Grafana dashboard for Cassandra
You can use our dashboard that monitors both Cassandra nodes and CassKop by running:
kubectl apply -f monitoring/dashboards/