ScyllaDB Operator is a Kubernetes Operator for managing and automating tasks related to managing ScyllaDB clusters. In this talk, you will learn the basics about ScyllaDB Operator and its features, including the new manual MultiDC support.
Size: 3.65 MB
Language: en
Added: Jun 19, 2024
Slides: 32 pages
Slide Content
What’s new in Scylla Operator Tomáš Nožička Principal Software Engineer at ScyllaDB
Biography Tomáš Nožička Tomáš is a principal software engineer leading the Scylla Operator team. Prior to joining ScyllaDB, he worked at Red Hat on a self-hosted, auto-upgrading Kubernetes control plane for OpenShift. He’s an emeritus Kubernetes Sig-Apps approver.
Scylla Operator Scylla Operator is a Kubernetes Operator for managing and automating tasks related to managing ScyllaDB clusters. Kubernetes API extensions + controllers that reconcile the desired state Open source ( https://github.com/scylladb/scylla-operator ) https://operator.docs.scylladb.com
Differences VMs Separate VM per tenant ScyllaDB runs directly on host 1 ScyllaDB per VM Dedicated resources Direct access to kernel, devices, other processes running on host User need to manually execute maintenance and upgrade tasks Kubernetes Multi-tenancy Everything runs in containers Multiple ScyllaDB’s on a Kubernetes node Shared pool of resources (QoS classes) Virtualized devices, separate namespaces Management and upgrade task are handled by the operator seamlessly Declarative API Operator reports status
How it works r ead /write apiVersion: scylla.scylladb.com/v1 kind : ScyllaCluster spec : version : 5.4.0 agentVersion : 3.2.5 datacenter : name : us-east- 1 racks : - name : us-east-1a members : 3 storage : capacity : 200Gi resources : limits : cpu : 8 memory : 128Gi status : racks : us-east-1 : readyMembers : 3 Controller / Operator Observe Calculate Reconcile
Storage Primarily oriented on local storage (NVMes) Best performance / latency Complex setup (gradularily automating the setup to reduce the complexity) Works with network storage as well
Local Storage Options github.com/scylladb/k8s-local-volume-provisioner Kubernetes CSI plugin Dynamic PersistentVolumes Directory based, uses xfs prjquota Throughput is limited with ScyllaDB io properties (limited multitenancy) github.com/kubernetes-sigs/sig-storage-local-static-provisioner Static (fixed PVs count, each pre-created by administrator) Block devices or directories without any quota
Available APIs ScyllaCluster.scylla.scylladb.com/v1 Creates ScyllaDB clusters ScyllaOperatorConfig.scylla.scylladb.com/v1alpha1 Configures the Scylla Operator NodeConfig.scylla.scylladb.com/v1alpha1 Configures tuning and node options ScyllaDBMonitoring.scylla.scylladb.com/v1alpha1 Sets up a monitoring stack and connects it to ScyllaClusters
Discovering Available APIs API Reference (operator.docs.scylladb.com) $ kubectl api-resources --api-group='scylla.scylladb.com' $ kubectl explain --api-version='scylla.scylladb.com/v1alpha1' NodeConfig.spec
Features
Multitenancy
Scaling
Multi-AZ Support
Rolling Config Changes
Rolling Upgrades
Auto Healing
Available since v1.11.0 IP source can be configured using `scyllacluster.spec.exposeOptions` Supported types ServiceClusterIP (default, existing clusters - ClusterIPs are virtual / reachable only in the same k8s cluster) ServiceLoadBalancerIngress PodIP Given ScyllaDB publishes `broadcast_rpc_address` to clients, this is essential for exposing ScyllaClusters on “external” IPs. (Load balancer on its own wouldn’t work.) Configuring IP Address Source for ScyllaClusters
apiVersion : scylla.scylladb.com/v1 kind : ScyllaCluster spec : exposeOptions : nodeService : type : ClusterIP broadcastOptions : clients : type : ServiceClusterIP nodes : type : ServiceClusterIP Broadcast Options - In-cluster Only
apiVersion : scylla.scylladb.com/v1 kind : ScyllaCluster spec : exposeOptions : nodeService : type : ClusterIP broadcastOptions : clients : type : PodIP nodes : type : ServiceClusterIP Broadcast Options - Clients over VPC
apiVersion : scylla.scylladb.com/v1 kind : ScyllaCluster spec : exposeOptions : nodeService : type : LoadBalancer broadcastOptions : clients : type : ServiceLoadBalancerIngress nodes : type : ClusterIP Broadcast Options - Internet
apiVersion : scylla.scylladb.com/v1 kind : ScyllaCluster spec : exposeOptions : nodeService : type : Headless broadcastOptions : clients : type : PodIP nodes : type : PodIP Broadcast Options - Multi VPC / Region
Available since v1.11.0 ScyllaCluster has new API field `. spec.externalSeeds ` that allows configuring seeds from other datacenters In most cases, Kubernetes cluster represents a region / datacenter Common MultiDC setup runs on multiple k8s clusters with Independent Scylla Operators in each k8s cluster Independent ScyllaClusters in different k8s clusters Connected through external (public or private) IPs and/or DNS using `.spec.externalSeeds` Manual MultiDC Support
Manual MultiDC - Networking Example
Global ScyllaDB Manager deployment Scylla Operator runs a small manager agent alongside each ScyllaDB node configures global ScyllaDB Manager with access to all ScyllaClusters configures ScyllaDB Manager with repair and backup tasks defined in ScyllaCluster CR ScyllaDB Manager Integration
ScyllaDBMonitoring CustomResource manages monitoring stack deployment and life cycle management Prometheus instance + ScyllaDB scraping rules Grafana instance + ScyllaDB dashboards Service discovery and authentication Managed ScyllaDB Monitoring
apiVersion : scylla.scylladb.com/v1alpha1 kind : ScyllaDBMonitoring metadata : name : example spec : type : Platform endpointsSelector : matchLabels : app.kubernetes.io/name : scylla scylla-operator.scylladb.com/scylla-service-type : member scylla/cluster: replace-with-your-scyllacluster-name components : prometheus : storage : … grafana : exposeOptions : webInterface : ingress : dnsDomains : [ test-grafana.test.svc.cluster.local ] ScyllaDBMonitoring Example
Creating RAID arrays Formatting disks with a filesystem (xfs) Mounting devices (disks / RAID arrays) Device tuning NodeConfig
Operator automatically creates and manages TLS certificates to setup CQL over TLS Serving certificates secret/<sc-name>- local-serving-ca secret/<sc-name>-local-serving-certs configmap/<sc-name>-local-serving-ca Client CA secret/<sc-name>-local-client-ca configmap/<sc-name>-local-client-ca Admin user credentials (signed by client CA) secret/<sc-name>-local-user-admin Automatic TLS certificates for CQL
We needs dozens of YAML manifest + logs to figure out most of the issues This used to take a lot of back and forth to figure out an issue Must-gather is a new tool that collects all necessary manifests and logs that relate to our APIs into one folder and redacts Secrets Users can always review the data before uploading them. Must-gather is now mandatory for reporting issues https://operator.docs.scylladb.com/master/support/must-gather.html Must-gather
Stay in Touch Tomáš Nožička [email protected] https://twitter.com/TomasNozicka https://github.com/tnozicka https://www.linkedin.com/in/tnozicka/