ScyllaDB University Live | Free Virtual Training Event
Learn more
ScyllaDB Documentation Logo Documentation
  • Server
  • Cloud
  • Tools
    • ScyllaDB Manager
    • ScyllaDB Monitoring Stack
    • ScyllaDB Operator
  • Drivers
    • CQL Drivers
    • DynamoDB Drivers
  • Resources
    • ScyllaDB University
    • Community Forum
    • Tutorials
Download
ScyllaDB Docs Scylla Operator Resources ScyllaClusters ScyllaClusters

ScyllaClusters¶

Introduction¶

ScyllaCluster defines a ScyllaDB datacenter and manages the racks within. This section aims to make you familiar with how it looks like and how to perform some of the basic configuration or accessing the APIs. By no means is this a complete description of what it can do. Please consult our generated API reference for a complete list of options.

Tip

You can always see the currently supported API fields for a particular version installed in your cluster by running

kubectl explain --api-version='scylla.scylladb.com/v1' ScyllaCluster.spec

Note that the Kubernetes clusters are only a regional concept, availability-wise they map into a ScyllaDB datacenter. To deploy a ScyllaDB cluster with multiple datacenters use our multi datacenter resource ScyllaDBCluster, or combine multiple Kubernetes clusters, each running a ScyllaCluster, To learn more about manual multi-dc deployments using ScyllaCluster resource, please see the dedicated multi-datacenter guide.

Creating a ScyllaCluster¶

Before we go and create the ScyllaCluster, we’ll first create our ScyllaDB config file that we’ll reference later in the ScyllaCluster definition.

 1kubectl apply --server-side -f=- <<EOF
 2apiVersion: v1
 3kind: ConfigMap
 4metadata:
 5  name: scylladb-config
 6data:
 7  scylla.yaml: |
 8    authenticator: PasswordAuthenticator
 9    authorizer: CassandraAuthorizer
10    # Other options
11EOF

Note

Some of the ScyllaDB config is also generated by the Scylla Operator based on your ScyllaCluster definition. While you shall not define conflicting options here (Scylla Operator config wins), we still want to give you a reasonable control to fine tune some ScyllaDB knobs. IOW, please stay away from touching networking, listen or published addresses and so on, but feel free to tune buffer sizes and such.

Now we can create a simple ScyllaCluster to get ScyllaDB running.

 1kubectl apply --server-side -f=- <<EOF
 2apiVersion: scylla.scylladb.com/v1
 3kind: ScyllaCluster
 4metadata:
 5  name: scylladb
 6spec:
 7  repository: docker.io/scylladb/scylla
 8  version: 2025.1.2
 9  agentVersion: 3.5.0
10  developerMode: false
11  automaticOrphanedNodeCleanup: true
12  sysctls:
13  - fs.aio-max-nr=30000000
14  datacenter:
15    name: us-east-1
16    racks:
17    - name: us-east-1a
18      members: 1
19      scyllaConfig: scylladb-config
20      storage:
21        capacity: 100Gi
22        storageClassName: scylladb-local-xfs
23      resources:
24        requests:
25          cpu: 1
26          memory: 8Gi
27        limits:
28          cpu: 1
29          memory: 8Gi
30      placement:
31        nodeAffinity:
32          requiredDuringSchedulingIgnoredDuringExecution:
33            nodeSelectorTerms:
34            - matchExpressions:
35              - key: scylla.scylladb.com/node-type
36                operator: In
37                values:
38                - scylla
39        tolerations:
40        - key: scylla-operator.scylladb.com/dedicated
41          operator: Equal
42          value: scyllaclusters
43          effect: NoSchedule
44EOF

Note

Values in these examples are only illustratory. You should always adjust the resources and storage capacity depending on your needs or the size and the type of your Kubernetes nodes. Similarly, the tolerations will differ depending on how and whether you set up dedicated node pools, or the placement if you want to set affinity for your rack to an availability zone or a failure domain.

Caution

Only Pods with Guaranteed QoS class are eligible to be tuned, otherwise they would not have pinned CPUs.

Always verify that your ScyllaCluster resource specifications meat all the criteria.

Don’t forget you have to specify limits for both resources(ScyllaDB) and agentResources(ScyllaDB Manager Agent) that run in the same Pod.

Note

Scylla Operator works with both ScyllaDB Open Source and ScyllaDB Enterprise. You only have to adjust the repository and tag fields for each ScyllaCluster.

In addition to it, if you want to use tuning from the Enterprise repository, you have to adjust scyllaUtilsImage on the global ScyllaOperatorConfig/cluster.

1apiVersion: scylla.scylladb.com/v1
2kind: ScyllaCluster
3metadata:
4  name: scylladb
5spec:
6  repository: docker.io/scylladb/scylla-enterprise
7  version: 2024.1.12
8  # ...
9EOF
# Wait for it to deploy.
kubectl wait --for='condition=Progressing=False' scyllacluster.scylla.scylladb.com/scylladb
kubectl wait --for='condition=Degraded=False' scyllacluster.scylla.scylladb.com/scylladb
kubectl wait --for='condition=Available=True' scyllacluster.scylla.scylladb.com/scylladb

Forcing a rolling restart¶

When you change a ScyllaDB config option that’s not live reloaded by ScyllaDB, or want to trigger a rolling restart for a different reason, ScyllaCluster allows triggering the rolling restarts declaratively by changing ScyllaCluster.spec.forceRedeploymentReason to any other value. This will trigger a rolling restart of all ScyllaDB nodes in sequence, always respecting the PodDistruptionsBudget and keeping the cluster available.

Spreading racks over availability zones¶

ScyllaCluster give you the freedom to chose how you want to spread you rack over your Kubernetes nodes with generic placement options. Here is a quick example of how you’d use them to spread your racks across different availability zone:

spec:
  datacenter:
    name: <dc_name>
    racks:
    - name: <rack_name>
      placement:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: failure-domain.beta.kubernetes.io/zone
                operator: In
                values:
                - <gcp_zone>
spec:
  datacenter:
    name: <dc_name>
    racks:
    - name: <rack_name>
      placement:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: topology.kubernetes.io/zone
                operator: In
                values:
                - <aws_zone>

Next steps¶

To follow up with other advanced topics, see the section index for options.

Was this page helpful?

PREVIOUS
ScyllaClusters
NEXT
ScyllaDB clients
  • Create an issue
  • Edit this page

On this page

  • ScyllaClusters
    • Introduction
    • Creating a ScyllaCluster
    • Forcing a rolling restart
    • Spreading racks over availability zones
    • Next steps
Scylla Operator
  • v1.17
    • v1.17
    • v1.16
    • v1.15
    • master
  • Architecture
    • Overview
    • Storage
      • Overview
      • Local CSI Driver
    • Tuning
    • ScyllaDB Manager
  • Installation
    • Overview
    • Kubernetes
      • Generic
      • EKS
      • GKE
    • GitOps (kubectl)
    • Helm
  • Resources
    • Overview
    • ScyllaClusters
      • ScyllaClusters
      • ScyllaDB clients
        • Discovering ScyllaDB Nodes
        • Using CQL
        • Using Alternator (DynamoDB)
      • Node operations using Scylla Operator
        • Upgrading version of Scylla
        • Replacing a Scylla node
        • Automatic cleanup and replacement in case when k8s node is lost
        • Maintenance mode
        • Restore from backup
      • Deploying multi-datacenter ScyllaDB clusters in Kubernetes
        • Build multiple Amazon EKS clusters with inter-Kubernetes networking
        • Build multiple GKE clusters with inter-Kubernetes networking
        • Deploy a multi-datacenter ScyllaDB cluster in multiple interconnected Kubernetes clusters
      • Exposing ScyllaDB cluster
    • ScyllaDBClusters
      • ScyllaDBClusters
      • Exposing ScyllaDB cluster
    • ScyllaDBMonitorings
    • NodeConfigs
    • ScyllaOperatorConfigs
    • RemoteKubernetesCluster
  • Quickstarts
    • Deploying ScyllaDB on GKE
    • Deploying ScyllaDB on EKS
  • Support
    • Support overview
    • Known issues
    • Troubleshooting
      • Troubleshooting installation issues
    • Gathering data with must-gather
    • Releases
  • API Reference
    • scylla.scylladb.com
      • NodeConfig (scylla.scylladb.com/v1alpha1)
      • RemoteKubernetesCluster (scylla.scylladb.com/v1alpha1)
      • RemoteOwner (scylla.scylladb.com/v1alpha1)
      • ScyllaCluster (scylla.scylladb.com/v1)
      • ScyllaDBCluster (scylla.scylladb.com/v1alpha1)
      • ScyllaDBDatacenter (scylla.scylladb.com/v1alpha1)
      • ScyllaDBMonitoring (scylla.scylladb.com/v1alpha1)
      • ScyllaOperatorConfig (scylla.scylladb.com/v1alpha1)
Docs Tutorials University Contact Us About Us
© 2025, ScyllaDB. All rights reserved. | Terms of Service | Privacy Policy | ScyllaDB, and ScyllaDB Cloud, are registered trademarks of ScyllaDB, Inc.
Last updated on 13 May 2025.
Powered by Sphinx 8.1.3 & ScyllaDB Theme 1.8.6