An introduction to the ScyllaDB Operator, what is it, how it’s used, and why we need it.
ScyllaDB Operator is an open-source project and you can find the code on GitHub. The operator in K8 is made up of a controller and a CRD. In our case, the controller is ScyllaDB Operator. The CRD is the ScyllaDB cluster. The controller gets the information from the CRD and is responsible for bringing up the cluster, setting up the networking, reporting on the status, and more.
The operator also creates a StatefulSet for each Rack.
Transcript
Let’s start, so ScyllaDB Operator is an open source project, Apache 2.0 licensed
you can find it on our github repository where we also host the documentation
so this documentation contains most of the stuff I’m going to show you today
so don’t worry, you don’t have to write any of the commands that I’m using today, so basically
ScyllaDB Operator currently supports three platforms Google Kubernetes Engine (GKE) which
we are going to use today and the EKS is still in experimental mode, so we don’t recommend it
to run into production but it works and also the minikube is used for development purposes
and so the Operator on Kubernetes is usually consists of two elements a controller and a CRD so
the controller in our case is a ScyllaDB Operator, which basically is an application running in Kubernetes
and which is talking to the Kubernetes API server and the other element is CRD which is
Custom Resource Definition and in our case we provide the ScyllaDB cluster CRD
so when user wants to deploy the ScyllaDB cluster on top of Kubernetes
he creates this resource and provides all the parameters related to this cluster, like the ScyllaDB
version which will be used, the Sidecar version and the topology of the cluster, so the name of the
data center, number of racks, the the name of the rack, how many nodes
are going to to be in this rack, some storage requirements, some resources allocation
and other stuff, and controller is getting notification about the creation of such
requests and on each update, and what it does it reconciles the cluster by creating all
the necessary Kubernetes resources in order to bring up the ScyllaDB, it is also responsible for
configuration, setting up the networking and also calculating the status, so user may
check the resource status and it basically represents the current state of the cluster
so we can see which version is being deployed or maybe some status of the rack and some other stuff
so this is how the architecture looks like
so Operator is watching and writing the status of the CRD, which user is providing and
when it’s creating the cluster, it also creates a. StatefulSet for each of the rack and StatefulSet
is responsible for the pod lifetime management but. Operator is providing the definition of the pod so
each pod consists of two containers, one of them is a ScyllaDB itself and the other container is
a Sidecar, which is basically used for communication with ScyllaDB and Operator
and Operator also creates for every pod deployed
in the cluster, it deploys a service which is basically provides the static IP address
for the nodes and these static. IP addresses are used as
internal node identifier and also drivers are using these IPs to connect to the cluster