Kubernetes is a declarative system for automatically deploying, managing, and scaling server-side applications and their dependencies. In this webinar, we will introduce Kubernetes at a high level and demonstrate how to get started using Scylla with Kubernetes and Google Compute Engine.
Join us to:
Understand the principles of Kubernetes and how it solves common problems of deploying distributed applications
Explore an example configuration of Scylla with Kubernetes that can serve as a starting point for your own system.
Get insight into the performance characteristics of Scylla when it it is run in a container (e.g. Docker) and deployed via Kubernetes.
Steering the Sea Monster - Integrating Scylla with Kubernetes
1. Steering the Sea Monster:
Integrating Scylla with
Kubernetes
Jesse Haber-Kucharsky, Software engineer, ScyllaDB
Moreno Garcia, Solutions architect, ScyllaDB
WEBINAR
2. 2
Speakers
Jesse Haber-Kucharsky has a strong interest in systems
programming and applying math to solve engineering
problems. He has worked on the software platform for
self-driving cars, NFC drivers for smartphones, and large-scale
distributed storage systems.
Moreno Garcia is a problem solver by talent and trade. He has
worked in IT for 15 years, the last five as a solution architect.
An open source software enthusiast, Moreno loves applying
new technology to solve old problems, and hates acronyms
with a passion.
3. 3
+ Next-generation NoSQL database
+ Drop-in replacement for Cassandra
+ 10X the performance & low tail latency
+ Open source and enterprise editions
+ Founded by the creators of KVM hypervisor
+ HQs: Palo Alto, CA; Herzelia, Israel
About ScyllaDB
6. Kubernetes
Automates deploying, scaling, and managing collections of containers
comprising applications.
Formerly an internal service at Google, now open-source and widely
supported.
6
7. Declarative structure
+ Resources (like Pods and StatefulSets) are described declaratively in YAML
+ The system adjusts itself dynamically to match the specification
7
8. Pod
+ A logical host
+ Executes (usually) a single container
+ Dynamically bound to a single (virtual) machine in the cluster
+ Ephemeral
8
9. StatefulSet
+ A specification of many Pods and their PersistentVolumeClaims
+ Assigns Pods dynamically to a static set of persistent identifiers (scylla-0, scylla-1, …)
9
11. PersistentVolumes
+ Describes storage resources
+ Pods request use of volumes through PersistentVolumeClaims
+ Can be created statically or dynamically based on claims
11
12. Allocating storage
+ A StorageClass specifies the type of physical storage and the provisioner
+ The built-in Google Kubernetes Engine provisioner can dynamically provision
PersistentVolumes
+ Volumes outlive any particular Pod
12
13. 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
+ lifecycle: preStop: uses nodetool to decommission a node and stream the data back to
the cluster
13
14. 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!
14
16. 16
Grouping manifests with Helm
+ Helm uses a packaging format called charts. A chart is a collection of files that describe
a related set of Kubernetes resources. A single chart might be used to deploy something
simple, like a memcached pod, or something complex, like a full web app stack with
HTTP servers, databases, caches, and so on.
+ Helm Charts deploy all the kubernetes entities in an ordered fashion wrapping them
together in a RELEASE. In addition to that, you also get versioning control allowing you to
upgrade your release and roll back changes.
17. Goal
+ Easily spin-up a Scylla cluster on K8s in Google Kubernetes Engine using Helm
+ Dynamically scale the size of the Scylla cluster with new nodes joining automatically
(through DNS)
17
18. Creating a cluster
+ The K8s install scripts work seamlessly with Google Kubernetes Engine
+ Install the Google Cloud SDK, kubectl and Helm
+ helm install scylladb
18
19. Getting a Scylla image
+ K8s can pull Docker images from the public Docker Hub
+ We can use the public scylladb/scylla:2.1.3 image unmodified
19
20. Demo
+ Preview some of the resource YAML files
+ Show the Scylla cluster status
+ Add a new node to the cluster dynamically with Helm upgrade
+ Observe the larger Scylla cluster
+ Remove a node from the cluster dynamically with Helm upgrade
+ Observe the smaller Scylla cluster
+ Remove a node from the cluster dynamically with Helm rollback
+ Observe the smaller Scylla cluster
20
21. 21
helm install scylladb
helm status <releaseName> #Show nodetool status, compare with helm status
helm upgrade --set replicaCount=5, <releaseName> #Show nodetool status
helm upgrade --set replicaCount=4, <releaseName> #Show nodetool status
helm rollback <releaseName> <revision-1>
Demo - commands
27. More details
+ See the full K8s and Helm specification and walk-through at
https://github.com/scylladb/scylla-code-samples
+ A blog post at https://www.scylladb.com/2018/03/29/scylla-kubernetes-overview/
describes some aspects of the code above
27
28. References
+ Scalable-multi-node Cassandra deployment on Kubernetes
(https://github.com/IBM/Scalable-Cassandra-deployment-on-Kubernetes/blob/master/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/)
+ Nice Introduction to Helm by Amy Chen: (https://youtu.be/vQX5nokoqr/)
28
29. 29
Q&A
Stay in touch
Learn more
jhaberku@scylladb.com
@jhaberku
scylladb.com/blog
scylladb-users.slack.com
moreno@scylladb.com
30. United States
1900 Embarcadero Road
Palo Alto, CA 94303
Israel
11 Galgalei Haplada
Herzelia, Israel
www.scylladb.com
@scylladb
THANK YOU