cassandra

by KubeGems

Helm chartv7.6.2App 3.11.10

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

The following table lists the configurable parameters of the Cassandra chart and their default values.

ParameterDescriptionDefault
global.imageRegistryGlobal Docker Image registrynil
global.imagePullSecretsGlobal Docker registry secret names as an array[] (does not add image pull secrets to deployed pods)
global.storageClassGlobal storage class for dynamic provisioningnil

Common parameters

ParameterDescriptionDefault
nameOverrideString to partially override cassandra.fullnamenil
fullnameOverrideString to fully override cassandra.fullnamenil
clusterDomainDefault Kubernetes cluster domaincluster.local
commonLabelsLabels to add to all deployed objectsnil
commonAnnotationsAnnotations to add to all deployed objects[]
extraDeployArray of extra objects to deploy with the release (evaluated as a template)nil

Cassandra parameters

ParameterDescriptionDefault
image.registryCassandra Image registrydocker.io
image.repositoryCassandra Image namebitnami/cassandra
image.tagCassandra Image tag{TAG_NAME}
image.pullPolicyImage pull policyIfNotPresent
image.pullSecretsSpecify docker-registry secret names as an array[] (does not add image pull secrets to deployed pods)
image.debugSpecify if debug logs should be enabledfalse
hostAliasesAdd deployment host aliases[]
dbUser.userCassandra admin usercassandra
dbUser.forcePasswordForce the user to provide a non-empty password for dbUser.userfalse
dbUser.passwordPassword for dbUser.user. Randomly generated if empty(Random generated)
dbUser.existingSecretUse an existing secret object for dbUser.user password (will ignore dbUser.password)nil
initDBConfigMapConfigmap for initialization CQL commands (done in the first node). Useful for creating keyspaces at startupnil (evaluated as a template)
initDBSecretSecret for initialization CQL commands (done in the first node) that contain sensitive data. Useful for creating keyspaces at startupnil (evaluated as a template)
existingConfigurationPointer to a configMap that contains custom Cassandra configuration files. This will override any Cassandra configuration variable set in the chartnil (evaluated as a template)
cluster.nameCassandra cluster namecassandra
cluster.seedCountNumber of seed nodes (note: must be greater or equal than 1 and less or equal to replicaCount)1
cluster.numTokensNumber of tokens for each node256
cluster.datacenterDatacenter namedc1
cluster.rackRack namerack1
cluster.enableRPCEnable Thrift RPC endpointtrue
cluster.enableUDFEnable CASSANDRA_ENABLE_USER_DEFINED_FUNCTIONSfalse
jvm.extraOptsSet the value for Java Virtual Machine extra options (JVM_EXTRA_OPTS)nil
jvm.maxHeapSizeSet Java Virtual Machine maximum heap size (MAX_HEAP_SIZE). Calculated automatically if nilnil
jvm.newHeapSizeSet Java Virtual Machine new heap size (HEAP_NEWSIZE). Calculated automatically if nilnil
commandOverride default container command (useful when using custom images)[]
argsOverride default container args (useful when using custom images)[]
extraEnvVarsExtra environment variables to be set on cassandra container{}
extraEnvVarsCMName of existing ConfigMap containing extra env varsnil
extraEnvVarsSecretName of existing Secret containing extra env varsnil

Statefulset parameters

ParameterDescriptionDefault
replicaCountNumber of Cassandra replicas1
updateStrategyUpdate strategy type for the statefulsetRollingUpdate
rollingUpdatePartitionPartition update strategynil
priorityClassNameCassandra priorityClassNamenil
podManagementPolicyStatefulSet pod management policyOrderedReady
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{} (evaluated as a template)
nodeSelectorNode labels for pod assignment{} (evaluated as a template)
tolerationsTolerations for pod assignment[] (evaluated as a template)
topologySpreadConstraintsTopology Spread Constraints for pod assignment[] (

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 v7.6.2 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