๐ Deploying a Multi-Node ScyllaDB Cluster on Kubernetes
ScyllaDB offers native support for Kubernetes via its Scylla Operator. This guide will walk you through deploying a multi-node ScyllaDB cluster on Kubernetes using the Scylla Operator.
๐ Prerequisites
- Kubernetes cluster (Minikube, kind, or cloud-managed like GKE, EKS, AKS)
kubectl
configured and connected to your cluster
Helm
(v3+)
- Optional: k9s for terminal-based Kubernetes management
โ๏ธ Step-by-Step Guide
1. Create a Namespace
kubectl create namespace scylla
2. Install Scylla Operator via Helm
helm repo add scylla-operator https://scylla-operator-charts.storage.googleapis.com/stable
helm repo update
helm install scylla-operator scylla-operator/scylla-operator \
--namespace scylla
Verify the operator is running:
kubectl get pods -n scylla
3. Deploy a Scylla Cluster
Create a file called scylla-cluster.yaml
:
apiVersion: scylla.scylladb.com/v1
kind: ScyllaCluster
metadata:
name: scylla-cluster
namespace: scylla
spec:
version: 5.4.0
datacenter:
name: dc1
racks:
- name: rack1
members: 3
resources:
requests:
cpu: 1
memory: 2Gi
โ ๏ธ Make sure your cluster has enough resources to schedule 3 pods with the above CPU/Memory requests.
Apply the config:
kubectl apply -f scylla-cluster.yaml
4. Monitor the Cluster
Check the pods:
kubectl get pods -n scylla -l scylla.scylladb.com/cluster=scylla-cluster
Check the status of the cluster:
kubectl describe ScyllaCluster scylla-cluster -n scylla
๐งช Accessing ScyllaDB
You can port-forward to access CQL:
kubectl port-forward svc/scylla-cluster-dc1-service -n scylla 9042:9042
Then connect using cqlsh
:
cqlsh localhost 9042
๐ Scaling the Cluster
To scale up to 5 nodes, update your scylla-cluster.yaml
:
members: 5
Apply the updated manifest:
kubectl apply -f scylla-cluster.yaml
๐งน Cleanup
To delete everything:
kubectl delete ScyllaCluster scylla-cluster -n scylla
helm uninstall scylla-operator -n scylla
kubectl delete namespace scylla
๐ Useful Resources
โ
Conclusion
You now have a multi-node ScyllaDB cluster running in Kubernetes, scalable and production-ready. With the Scylla Operator, managing clusters becomes declarative and Kubernetes-native.
For advanced use, consider:
- Setting up Monitoring Stack with Prometheus + Grafana
- Adding NodeSelectors, Tolerations, or Persistent Volumes
- Running across multiple datacenters or regions
Happy scaling! ๐๏ธ๐