cassandra

by [riftbit]

Helm chartv8.0.4App 4.0.1Verified publisher

Apache Cassandra is a free and open-source distributed database management system designed to handle large amounts of data across many commodity servers, providing high availability with no single point of failure. Cassandra offers robust support for clusters spanning multiple datacenters, with asynchronous masterless replication allowing low latency operations for all clients.

About this chart

cassandra

Apache Cassandra is a free and open-source distributed database management system designed to handle large amounts of data across many commodity servers or datacenters.

TL;DR

$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/cassandra

Introduction

This chart bootstraps an Apache Cassandra deployment on a Kubernetes cluster using the Helm package manager.

Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters. This Helm chart has been tested on top of Bitnami Kubernetes Production Runtime (BKPR). Deploy BKPR to get automated TLS certificates, logging and monitoring for your applications.

Prerequisites

  • Kubernetes 1.12+
  • Helm 3.1.0
  • PV provisioner support in the underlying infrastructure

Installing the Chart

To install the chart with the release name my-release:

$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/cassandra

These commands deploy one node with Apache Cassandra on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the my-release release:

$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Parameters

Global parameters

NameDescriptionValue
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]
global.storageClassGlobal StorageClass for Persistent Volume(s)""

Common parameters

NameDescriptionValue
nameOverrideString to partially override common.names.fullname""
fullnameOverrideString to fully override common.names.fullname""
commonLabelsLabels to add to all deployed objects (sub-charts are not considered){}
commonAnnotationsAnnotations to add to all deployed objects{}
clusterDomainKubernetes cluster domain namecluster.local
extraDeployArray of extra objects to deploy with the release[]
diagnosticMode.enabledEnable diagnostic mode (all probes will be disabled and the command will be overridden)false
diagnosticMode.commandCommand to override all containers in the deployment["sleep"]
diagnosticMode.argsArgs to override all containers in the deployment["infinity"]

Cassandra parameters

NameDescriptionValue
image.registryCassandra image registrydocker.io
image.repositoryCassandra image repositorybitnami/cassandra
image.tagCassandra image tag (immutable tags are recommended)4.0.1-debian-10-r0
image.pullPolicyimage pull policyIfNotPresent
image.pullSecretsCassandra image pull secrets[]
image.debugEnable image debug modefalse
dbUser.userCassandra admin usercassandra
dbUser.forcePasswordForce the user to provide a nonfalse
dbUser.passwordPassword for dbUser.user. Randomly generated if empty""
dbUser.existingSecretUse an existing secret object for dbUser.user password (will ignore dbUser.password)""
initDBConfigMapConfigMap with cql scripts. Useful for creating a keyspace and pre-populating data""
initDBSecretSecret with cql script (with sensitive data). Useful for creating a keyspace and pre-populating data""
existingConfigurationConfigMap with custom cassandra configuration files. This overrides any other Cassandra configuration set in the chart""
cluster.nameCassandra cluster namecassandra
cluster.seedCountNumber of seed nodes1
cluster.numTokensNumber of tokens for each node256
cluster.datacenterDatacenter namedc1
cluster.rackRack namerack1
cluster.endpointSnitchEndpoint SnitchSimpleSnitch
cluster.internodeEncryptionDEPRECATED: use tls.internode and tls.client instead. Encryption values.none
cluster.clientEncryptionClient Encryptionfalse
cluster.extraSeedsFor an external/second cassandra ring.[]
jvm.extraOptsSet the value for Java Virtual Machine extra options""
jvm.maxHeapSizeSet Java Virtual Machine maximum heap size (MAX_HEAP_SIZE). Calculated automatically if nil""
jvm.newHeapSizeSet Java Virtual Machine new heap size (HEAP_NEWSIZE). Calculated automatically if nil""
commandCommand for running the container (set to default if not set). Use array form[]
argsArgs for running the container (set to default if not set). Use array form[]
extraEnvVarsExtra environment variables to be set on cassandra container[]
extraEnvVarsCMName of existing ConfigMap containing extra env vars""
extraEnvVarsSecretName of existing Secret containing extra env vars""

Statefulset parameters

NameDescriptionValue
replicaCountNumber of Cassandra replicas1
updateStrategyupdateStrategy for Cassandra statefulsetRollingUpdate
hostAliasesAdd deployment host aliases[]
rollingUpdatePartitionPartition update strategy""
podManagementPolicyStatefulSet pod management policyOrderedReady
priorityClassNameCassandra pods' priority.""
podAnnotationsAdditional pod annotations{}
podLabelsAdditional pod labels{}
podAffinityPresetPod affinity preset. Ignored if affinity is set. Allowed values: soft or hard""
podAntiAffinityPresetPod anti-affinity preset. Ignored if affinity is set. Allowed values: soft or hardsoft
nodeAffinityPreset.typeNode affinity preset type. Ignored if affinity is set. Allowed values: soft or hard""
nodeAffinityPreset.keyNode label key to match. Ignored if affinity is set""
nodeAffinityPreset.valuesNode label values to match. Ignored if affinity is set[]
affinityAffinity for pod assignment{}
nodeSelectorNode labels for pod assignment{}
tolerationsTolerations for pod assignment[]
topologySpreadConstraintsTopology Spread Constraints for pod assignment[]
podSecurityContext.enabledEnabled Cassandra pods' Security Contexttrue
podSecurityContext.fsGroupSet Cassandra pod's Security Context fsGroup1001
containerSecurityContext.enabledEnabled Cassandra containers' Security Contexttrue
containerSecurityContext.runAsUseret Cassandra container's Security Context runAsUser1001
resources.limitsThe resources limits for Cassandra containers{}
resources.requestsThe requested resources for Cassandra containers{}
livenessProbe.enabledEnable livenessProbetrue
livenessProbe.initialDelaySecondsInitial delay seconds for livenessProbe60
livenessProbe.periodSecondsPeriod seconds for livenessProbe30
livenessProbe.timeoutSecondsTimeout seconds for livenessProbe5
livenessProbe.failureThresholdFailure threshold for livenessProbe5
`livenessProbe.s

Deploy cassandra with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has cassandra on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartcassandra is pinned at v8.0.4 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply