Kubernetes is a declarative system for automatically deploying, managing, and scaling applications and their dependencies. In this short talk, I'll demonstrate a small Scylla cluster running in Google Compute Engine via Kubernetes and our publicly-published Docker images.
SQL Database Design For Developers at php[tek] 2024
Scylla Summit 2017: Scylla on Kubernetes
1. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Automating Scylla deployments
with Kubernetes
Software engineer, ScyllaDB
Jesse Haber-Kucharsky
2. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Setting expectations
I have no expertise in Kubernetes, Google Compute Engine, or Docker.
Nonetheless, it was easy to get a basic deployment running.
2
3. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Why Kubernetes?
4. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Containers
Isolate application resources and its environment in self-contained
units.
4
5. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Kubernetes
Automate deploying, scaling, and managing collections of containers
comprising applications.
Formerly an internal service at Google, now open-source and widely
supported.
5
6. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Quick K8s*
overview
* I’m cool like that.
7. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Declarative structure
▪ Resources (like Pods and StatefulSets) are described declaratively
in YAML
▪ The system adjusts itself dynamically to match the specification
7
8. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Pod
▪ A logical host
▪ Executes (usually) a single container
▪ Dynamically bound to a single (virtual) machine in the cluster
▪ Ephemeral
8
9. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
PersistentVolumes
▪ Describes storage resources
▪ Pods request use of volumes through PersistentVolumeClaims
▪ Can be created statically or dynamically based on claims
9
10. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
StatefulSet
▪ A specification of many Pods and their PersistentVolumeClaims
▪ Assigns Pods dynamically to a static set of persistent identifiers
(scylla-0, scylla-1, …)
10
11. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Demo
12. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Goal
▪ Easily spin-up a Scylla cluster on K8s in Google Compute Engine
▪ Dynamically scale the size of the Scylla cluster with new nodes
joining automatically (through DNS)
12
13. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Creating a cluster
▪ The K8s install scripts work seamlessly with Google Compute
Engine
▪ Install the Google Cloud SDK
▪ Download K8s and cluster/kube-up.sh
13
14. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Getting a Scylla image
▪ K8s can pull Docker images from the public Docker Hub
▪ We can use the public scylladb/scylla:2.0.0 image unmodified
14
15. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Allocating storage
▪ A StorageClass specifies the type of physical storage and the
provisioner
▪ The built-in Google Compute Engine provisioner can dynamically
provision PersistentVolumes
▪ Volumes outlive any particular Pod
15
16. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Checking for readiness
▪ A ConfigMap can be used to distribute individual files to Pods
▪ ready-probe.sh is invoked by K8s and uses nodetool to check the
status
16
17. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Seeding the cluster
▪ New Scylla nodes need to know where to connect to join the
cluster
▪ DNS records are automatically created for the static names of a
StatefulSet
▪ No custom code (SeedProvider) in Scylla required!
17
18. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Demo
▪ Preview some of the resource YAML files
▪ Show the Scylla cluster status
▪ Add a new node to the cluster dynamically with K8s
▪ Observe the larger Scylla cluster
18
19. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Enraptured focus on my laptop screen
19
20. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
More details
▪ See the full K8s specification and walk-through at
https://github.com/scylladb/scylla-code-samples
▪ Look for an upcoming blog post.
20
21. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
References
▪ Scalable-multi-node Cassandra deployment on Kubernetes
(https://github.com/IBM/Scalable-Cassandra-deployment-on-Kubernetes/blob/m
aster/README.md)
▪ Running Kubernetes on google Compute Engine
(https://kubernetes.io/docs/getting-started-guides/gce/)
▪ Example: Deploying Cassandra with Stateful Sets
(https://kubernetes.io/docs/tutorials/stateful-application/cassandra/)
▪ Strategies for Running Stateful Workloads in Kubernetes: Pet Sets
(https://thenewstack.io/strategies-running-stateful-applications-kubernetes-pet-
sets/)
21
22. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
THANK YOU
jhaberku@scylladb.com
@jhaberku
Please stay in touch
Any questions?