elasticsearch

by groundhog2k

Helm chartv0.8.2App 8.0.0

A Helm chart for Elasticsearch on Kubernetes

About this chart

Elasticsearch

⚠️ Deprecation and Archive Notice

This chart version (v0.8.2) is the last update and the chart is deprecated and will no longer be maintained.

Please use the original Elasticsearch helm chart at https://github.com/elastic/helm-charts

Changelog

see RELEASENOTES.md

A Helm chart for Elasticsearch on Kubernetes

TL;DR

helm repo add groundhog2k https://groundhog2k.github.io/helm-charts/
helm install my-release groundhog2k/elasticsearch

Introduction

This chart uses the original Elasticsearch image from Docker Hub to deploy a stateful Elasticsearch instance in a Kubernetes cluster.

It fully supports deployment of the multi-architecture docker image.

Limitations

The actual chart version only supports a single-node Elasticsearch cluster (replicaset = 1). Future upgrades will allow to span a multi-node cluster.

Prerequisites

  • Kubernetes 1.12+
  • Helm 3.x
  • PV provisioner support in the underlying infrastructure

Installing the Chart

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

helm install my-release groundhog2k/elasticsearch

Uninstalling the Chart

To uninstall/delete the my-release deployment:

helm uninstall my-release

Common parameters

KeyTypeDefaultDescription
fullnameOverridestring""Fully override the deployment name
nameOverridestring""Partially override the deployment name

Deployment parameters

KeyTypeDefaultDescription
image.pullPolicystring"IfNotPresent"Image pull policy
image.repositorystring"docker.elastic.co/elasticsearch/elasticsearch"Image name
image.tagstring""Image tag
imagePullSecretslist[]Image pull secrets
startupProbeobjectsee values.yamlStartup probe configuration
livenessProbeobjectsee values.yamlLiveness probe configuration
readinessProbeobjectsee values.yamlReadiness probe configuration
customStartupProbeobject{}Custom startup probe (overwrites default startup probe configuration)
customLivenessProbeobject{}Custom liveness probe (overwrites default liveness probe configuration)
customReadinessProbeobject{}Custom readiness probe (overwrites default readiness probe configuration)
resourcesobject{}Resource limits and requests
nodeSelectorobject{}Deployment node selector
podAnnotationsobject{}Additional pod annotations
podSecurityContextobjectsee values.yamlPod security context
securityContextobjectsee values.yamlContainer security context
envlist[]Additional container environmment variables
argslist[]Additional container command arguments
serviceAccount.annotationsobject{}Additional service account annotations
serviceAccount.createboolfalseEnable service account creation
serviceAccount.namestring""Name of the service account
affinityobject{}Pod affinity
tolerationslist[]Pod tolerations
podManagementPolicystringOrderedReadyPod management policy
updateStrategyTypestringRollingUpdateUpdate strategy
revisionHistoryLimitintnilMaximum number of revisions maintained in revision history

Service paramters

KeyTypeDefaultDescription
service.typestring"ClusterIP"Service type
service.httpPortint9200Elasticsearch http service port
service.transportPortint9300Elasticsearch transport service port
service.httpNodePortintnilThe http node port (only relevant for type LoadBalancer or NodePort)
service.transportNodePortintnilThe transport node port (only relevant for type LoadBalancer or NodePort)
service.clusterIPstringnilThe cluster ip address (only relevant for type LoadBalancer or NodePort)
service.loadBalancerIPstringnilThe load balancer ip address (only relevant for type LoadBalancer)
service.annotationsobject{}Additional service annotations

Ingress parameters

KeyTypeDefaultDescription
ingress.enabledboolfalseEnable ingress for Gitea service
ingress.annotationsstringnilAdditional annotations for ingress
ingress.hosts[].hoststringnilHostname for the ingress endpoint
ingress.hosts[].host.paths[]stringnilPath routing for the ingress endpoint host
ingress.tlslist[]Ingress TLS parameters

Storage parameters

KeyTypeDefaultDescription
storage.accessModes[0]string"ReadWriteOnce"Storage access mode
storage.persistentVolumeClaimNamestringnilPVC name when existing storage volume should be used
storage.requestedSizestringnilSize for new PVC, when no existing PVC is used
storage.classNamestringnilStorage class name

Elasticsearch parameters

KeyTypeDefaultDescription
settings.discoveryTypestringsingle-nodeThe cluster discovery type
settings.javaOptsstring-Xms512m -Xmx512mAdditional JVM options
settings.clusterNamestringsinglenode-clusterCluster name

Further Elasticsearch parameters can be set via environment variables (see Deployment parameter: env)

Deploy elasticsearch with OpenTenant

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