Documentation Index
Fetch the complete documentation index at: https://docs.controlplane.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Elasticsearch is a distributed search and analytics engine built on Apache Lucene. This template deploys a production-ready Elasticsearch 8.17.0 cluster with automatic master election, optional Kibana for visualization and management, and automated snapshot backups to AWS S3 or GCS via Elasticsearch’s built-in Snapshot Lifecycle Management (SLM).This template does not create a GVC. You must deploy it into an existing GVC.
What Gets Created
- Stateful Elasticsearch Workload — A multi-node Elasticsearch cluster. Each replica gets its own persistent volume so index data and shards survive restarts.
- Volume Set — One persistent volume per replica for Elasticsearch data.
- Standard Kibana Workload (optional, enabled by default) — The Elasticsearch web UI for querying data, managing indices, and monitoring cluster health.
- Standard Backup Setup Workload (optional) — A one-time job that waits for the cluster to be healthy, registers the snapshot repository with Elasticsearch, and creates the SLM policy. Runs once and can be removed after initial setup.
- Identity & Policy — An identity bound to the workloads with
revealaccess to the configuration secrets, and cloud storage access when backup is enabled. - Secrets — Configuration secrets for Elasticsearch and Kibana credentials and cluster settings.
Prerequisites
This template has no external prerequisites unless backup is enabled. To install, follow the instructions for your preferred method:UI
Browse, install, and manage templates visually
CLI
Manage templates from your terminal
Terraform
Declare templates in your Terraform configurations
Pulumi
Declare templates in your Pulumi programs
Configuration
The defaultvalues.yaml for this template:
Cluster Settings
replicas— Number of Elasticsearch nodes. Must be an odd number (3, 5, 7) to maintain a valid master election quorum.clusterName— The Elasticsearch cluster name. Used internally by nodes to discover each other.jvmHeap— JVM heap size per node. Set to approximately 50% ofmaxMemory. Hard cap at30g.
A minimum of 3 replicas is required for master quorum. With 3 nodes, the cluster can survive the loss of 1 node. Always use an odd number — an even number of nodes does not improve fault tolerance and can cause split-brain scenarios.
Resources and Storage
resources.minCpu/resources.minMemory— Guaranteed minimum CPU and memory per node.resources.maxCpu/resources.maxMemory— Maximum CPU and memory per node.volumeset.capacity— Initial volume size in GiB per node (minimum 10).volumeset.autoscaling.enabled— Automatically expand volumes as data grows.volumeset.autoscaling.maxCapacity— Maximum volume size in GiB.volumeset.autoscaling.minFreePercentage— Triggers a scale-up when free space falls below this percentage.volumeset.autoscaling.scalingFactor— Multiplier applied to current capacity on each scale-up.
Multi-Zone
WhenmultiZone.enabled: true, Control Plane spreads Elasticsearch replicas across availability zones within the location. This improves durability — if a zone goes down, remaining nodes in other zones maintain quorum.
Verify your selected location supports multiple availability zones before enabling.
Internal Access
Controls which workloads can reach Elasticsearch and Kibana. Both have independentinternal_access settings.
| Type | Description |
|---|---|
same-gvc | Allow access from all workloads in the same GVC (recommended) |
same-org | Allow access from all workloads in the org |
workload-list | Allow access only from specific workloads listed in workloads |
Kibana
Kibana is enabled by default and provides a web UI for exploring data, managing indices, building dashboards, and monitoring cluster health.kibana.enabled— Deploy the Kibana workload.kibana.resources.cpu/kibana.resources.memory— CPU and memory for the Kibana container.kibana.internal_access— Controls which workloads can reach Kibana (same options asinternal_access).
Connecting
Both Elasticsearch and Kibana are accessible internally from within the same GVC. External access is blocked by default — usecpln port-forward to reach them from your local machine.
| Service | Internal hostname | Port |
|---|---|---|
| Elasticsearch | {release-name}-elasticsearch.{gvc-name}.cpln.local | 9200 |
| Kibana | {release-name}-kibana.{gvc-name}.cpln.local | 5601 |
Scaling
Scaling up — Increasereplicas to the next odd number and run cpln helm upgrade. New nodes join the cluster automatically and Elasticsearch begins rebalancing shards.
Backup
Elasticsearch backups are incremental snapshots stored directly in S3 or GCS via the built-in repository-s3 and repository-gcs plugins — no separate backup image is required. The Snapshot Lifecycle Management (SLM) feature handles scheduling and retention automatically. When backup is enabled, a one-time Backup Setup Workload runs at install time. It waits for the cluster to be healthy, then calls the Elasticsearch API to register the snapshot repository and create the SLM policy. Once it completes successfully, it can be removed to save resources:The backup schedule uses Quartz cron format with 6 fields (seconds, minutes, hours, day-of-month, month, day-of-week) — not the standard 5-field cron format. For example,
"0 0 2 * * ?" runs daily at 2am UTC.AWS S3 Prerequisites
- Create an S3 bucket. Set
backup.aws.bucketto its name andbackup.aws.regionto its region. - If you do not have a Cloud Account set up, refer to the docs to Create a Cloud Account. Set
backup.aws.cloudAccountNameto its name. - Create an IAM policy with the following JSON, replacing
YOUR_BUCKET_NAME:
- Set
backup.aws.policyNameto the name of the policy created in step 3.
GCS Prerequisites
- Create a GCS bucket. Set
backup.gcp.bucketto its name. - If you do not have a Cloud Account set up, refer to the docs to Create a Cloud Account. Set
backup.gcp.cloudAccountNameto its name. - Add the Storage Admin role to the GCP service account associated with the Cloud Account.
Manual Snapshots
Exec into any Elasticsearch container to trigger a snapshot immediately or inspect status:Restoring a Snapshot
Exec into any Elasticsearch node in the cluster to run restore commands. The snapshot repository (backup-repo) is already registered.
List available snapshots:
Scenario 1 — Disaster Recovery (Fresh Cluster)
Deploy a new cluster from this template with backup enabled and pointing at the same bucket. Once the Backup Setup Workload completes (re-registering the same repository), restore all indices:Scenario 2 — Restore to Existing Cluster
When the target indices already exist, close them before restoring or the restore will be rejected:Scenario 3 — Restore Specific Indices
Important Notes
- Replica count must be odd — Elasticsearch requires an odd number of master-eligible nodes for quorum. Even numbers do not improve fault tolerance and can cause split-brain.
- JVM heap — Set
jvmHeapto approximately 50% ofmaxMemory, with a hard cap of30g. Elasticsearch relies heavily on off-heap memory for the filesystem cache. - Backup schedule format — SLM uses Quartz cron format (6 fields), not the standard 5-field cron. The
?wildcard is required in the day-of-week field when day-of-month is set. - Scale down carefully — Always snapshot before reducing replicas. Verify no primary shards exist on nodes being removed before running the upgrade.
External References
Elasticsearch Documentation
Official Elasticsearch reference documentation
Kibana Documentation
Official Kibana guide
Snapshot and Restore
Elasticsearch snapshot and restore guide
Snapshot Lifecycle Management
Create, monitor, and delete snapshots with SLM
Elasticsearch Template
View the source files, default values, and chart definition