cratedb

by hmdmph

Helm chartv2.0.3App 4.7.0

A Helm chart for CrateDB ( CrateDB is a distributed SQL database built on top of a NoSQL foundation)

About this chart

CrateDB

CrateDB is a distributed SQL database built on top of a NoSQL foundation. It combines the familiarity of SQL with the scalability and data flexibility of NoSQL, enabling developers to:

  • Use SQL to process any type of data, structured or unstructured
  • Perform SQL queries at realtime speed, even JOINs and aggregates
  • Scale simply

This chart deploys a CrateDB cluster as a StatefulSet. It creates a External Service that does load balancing by default. The default persistence mechanism is simply the ephemeral local filesystem, but production deployments should set persistentVolume.enabled to true to attach storage volumes to each Pod in the Deployment. Use with helm version 2.

TL;DR

$ helm install hmdmph/cratedb

Prerequisites

  • Kubernetes 1.8+ with Beta APIs enabled
  • If deploying in production environment, you need to have persistent volumes

Installing the Chart

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

$ helm repo add hmdmph https://hmdmph.github.io/helm-charts
$ helm install --name my-crate hmdmph/cratedb

This Helm chart deploys crateDB on the Kubernetes cluster in a default configuration. The configuration section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Tip List installed crateDB release helm list | grep crate

Tip get history of chart version/ status/ etc... CrateDB releases helm history my-crate

Uninstalling the Chart

To uninstall/delete the my-crate Deployment:

$ helm delete my-crate

The command removes all the Kubernetes components associated with the chart and deletes the release. ( If your used persistence volumes then removing those will depends on your pv policy)

Upgrading an existing Release to a new major version

A major chart version change (like v0.1.0 -> v1.0.0) indicates that there may be incompatible or breaking changes that require manual actions.

##Changelog

2.0.2

2021-12-19

  • update with using latest cratedb configs

2.0.0

2020-06-13

  • update with using latest cratedb configs
  • update to use with helm v2

1.0.1 -

2019-07-29

  • fixed typo in readme file

0.1.0

2019-06-20

  • This is the initial version of the crateDB chart with the minimal configuration/ settings.

How to delete the crateDB StatefulSet

$ kubectl delete statefulsets --cascade=false my-crate

Configuration

The following table lists main configurable most common parameters of the CrateDB chart and their default values:

ParameterDescriptionDefault
clusterSizeThe initial number of nodes in the CrateDB cluster3
clusterNamename given for the new CrateDB clustercratedb-cluster
namespacenamespace that you want to install crateDBdefault
cratadbStatefulsetNameName for the CrateDB statefulsetcrate-set
heapSizeSize of the heap that your want to set for the CrateDB (megabytes)1G
resourcesresources requests/limits can be defined as your requirement{}
persistentVolume.enabledenable persistent volumes ( this must be true if your are running in productionfalse
persistentVolume.accessModesaccess modeReadWriteOnce
persistentVolume.sizedisk size ( production environment you have to specify according to your requirement10Gi
cratedbConfig.dataPathCrateDB configuration, data path/data
cratedbConfig.volumeMountNamemount volume namedata
nameOverrideoverride chart name""
fullnameOverrideoverride chart full name""

Following table contains other parameters are also configurable in chart, but most of the time you may don't need to modify

ParameterDescriptionDefault
cratedbConfig.discovery.recoverAfterNodesCrateDB recover when found this much of nodes2
cratedbConfig.discovery.zen.minimumMasterNodesminimum master nodes2
cratedbConfig.discovery.zen.hostsProviderhost providersrv
internalService.portport for the internal service, this is the port for inter-node communication4300
internalService.portNamename for the internal service portcrate-internal
internalService.namename for the inter-node communication servicecrate-internal-service
externalService.namename for the external servicecrate-external-service
externalService.webUiPortport for the webUI for the CrateDB4200
externalService.webPortNamename of the port for the webUI for the CrateDBcrate-web
externalService.pgsqlWirePortPostgreSQL wire protocol port5432
labelsYour labels that you want to put in the resources{}
image.repositoryCrateDB imagecrate
image.tagversion/ tag of the image3.2.7
image.pullPolicyimage pull policyIfNotPresent
podAnnotationspod annotations{}
podSecurityContextpod securityContext{}
serviceAccount.createcreate service accounttrue
serviceAccount.annotationsservice account annotations{}
affinitypod affinity{}
nodeSelectornode selection{}
tolerationstolerations[]

Happy Helm with ♥ at hmdmph

Deploy cratedb with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has cratedb 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 chartcratedb is pinned at v2.0.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