cassandra

by joaquinito2051

Helm chartv2.3.3App 3.11.4

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 install <helm-repo>/cassandra

$ helm install bitnami/cassandra

Introduction

This chart bootstraps a 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.8+
  • PV provisioner support in the underlying infrastructure

Installing the Chart

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

$ helm install --name my-release <helm-repo>/cassandra

$ helm install --name my-release bitnami/cassandra The command deploys one node with Cassandra on the Kubernetes cluster in the default configuration. The configuration 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.

Configuration

The following tables 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)
image.registryCassandra Image registrydocker.io
image.repositoryCassandra Image namebitnami/cassandra
image.tagCassandra Image tag{VERSION}
image.pullPolicyImage pull policyAlways
image.pullSecretsSpecify docker-registry secret names as an array[] (does not add image pull secrets to deployed pods)
service.typeKubernetes Service typeClusterIP
service.nodePortKubernetes Service nodePortnil
service.loadBalancerIPLoadBalancerIP if service type is LoadBalancernil
service.annotationsAnnotations for the service{}
persistence.enabledUse PVCs to persist datatrue
persistence.storageClassPersistent Volume Storage Classgeneric
persistence.annotationsPersistent Volume Claim annotations Annotations{}
persistence.accessModesPersistent Volume Access Modes[ReadWriteOnce]
persistence.sizePersistent Volume Size8Gi
tlsEncryptionSecretNameSecret with keystore, keystore password, truststore and truststore password{}
resourcesCPU/Memory resource requests/limits{}
existingConfigurationPointer to a configMap that contains custom Cassandra configuration files. This will override any Cassandra configuration variable set in the chart{}
cluster.nameCassandra cluster namecassandra
cluster.replicaCountNumber of Cassandra nodes1
cluster.seedCountNumber of seed nodes (note: must be greater or equal than 1 and less or equal to cluster.replicaCount)1
cluster.numTokensNumber of tokens for each node256
cluster.datacenterDatacenter namedc1
cluster.rackRack namerack1
cluster.enableRPCEnable Thrift RPC endpointtrue
cluster.minimumAvailableMinimum nuber of instances that must be available in the cluster (used of PodDisruptionBudget)1
cluster.internodeEncryptionSet internode encryption. NOTE: A value different from 'none' requires setting tlsEncryptionSecretNamenone
cluster.clientEncryptionSet client-server encryption. NOTE: A value different from 'false' requires setting tlsEncryptionSecretNamefalse
cluster.jvm.extraOptsSet the value for Java Virtual Machine extra optinos (JVM_EXTRA_OPTS)nil
cluster.jvm.maxHeapSizeSet Java Virtual Machine maximum heap size (MAX_HEAP_SIZE). Calculated automatically if nilnil
cluster.jvm.newHeapSizeSet Java Virtual Machine new heap size (HEAP_NEWSIZE). Calculated automatically if nilnil
service.portCQL Port for the Kubernetes service9042
service.thriftPortThrift Port for the Kubernetes service9160
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 startup, for instancenil
livenessProbe.enabledTurn on and off liveness probetrue
livenessProbe.initialDelaySecondsDelay before liveness probe is initiated30
livenessProbe.periodSecondsHow often to perform the probe30
livenessProbe.timeoutSecondsWhen the probe times out5
livenessProbe.successThresholdMinimum consecutive successes for the probe to be considered successful after having failed1
livenessProbe.failureThresholdMinimum consecutive failures for the probe to be considered failed after having succeeded.5
readinessProbe.enabledTurn on and off readiness probetrue
readinessProbe.initialDelaySecondsDelay before readiness probe is initiated5
readinessProbe.periodSecondsHow often to perform the probe10
readinessProbe.timeoutSecondsWhen the probe times out5
readinessProbe.successThresholdMinimum consecutive successes for the probe to be considered successful after having failed1
readinessProbe.failureThresholdMinimum consecutive failures for the probe to be considered failed after having succeeded.5
podAnnotationsAdditional pod annotations{}
podLabelsAdditional pod labels{}
statefulset.updateStrategyUpdate strategy for StatefulSetonDelete
statefulset.rollingUpdatePartitionPartition update strategynil
securityContext.enabledEnable security contexttrue
securityContext.fsGroupGroup ID for the container1001
`securityContext.

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 v2.3.3 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