Skip to main content

Elasticsearch

Distributed search and analytics engine for full-text search and log analysis.

CategoryDatabases
Deploy./uis deploy elasticsearch
Undeploy./uis undeploy elasticsearch
Depends onNone
Required byNone
Helm chartelastic/elasticsearch (pinned: 9.3.0)
Default namespacedefault

What It Does

Elasticsearch provides full-text search, real-time analytics, and structured document storage. It runs as a single-node standalone instance suitable for development and testing.

Key capabilities:

  • Full-text search with relevance scoring and highlighting
  • Analytics via aggregations (date histograms, terms, metrics)
  • RESTful API for all operations
  • Security enabled with username/password authentication

Deploy

./uis deploy elasticsearch

No dependencies.

Verify

# Quick check
./uis verify elasticsearch

# Manual check
kubectl get pods -n default -l app.kubernetes.io/name=elasticsearch

# Test cluster health
kubectl exec -it elasticsearch-master-0 -- curl -u "elastic:$ES_PASSWORD" -s \
"http://localhost:9200/_cluster/health?pretty"

Configuration

Elasticsearch configuration is in manifests/060-elasticsearch-config.yaml. Key settings:

SettingValueNotes
ArchitecturestandaloneSingle master node, no data/coordinating/ingest nodes
Storage8Gi PVCPersistent index data
HTTP port9200REST API
Transport port9300Inter-node communication
SecurityEnabledUsername/password auth required
JVM heap512mXms and Xmx

Secrets

VariableFilePurpose
DEFAULT_ELASTICSEARCH_PASSWORD.uis.secrets/secrets-config/default-secrets.envElastic user password

Key Files

FilePurpose
manifests/060-elasticsearch-config.yamlHelm values (single-node, security, JVM)
ansible/playbooks/060-setup-elasticsearch.ymlDeployment playbook with verification
ansible/playbooks/060-remove-elasticsearch.ymlRemoval playbook

Undeploy

./uis undeploy elasticsearch

Troubleshooting

Pod won't start (OOM or JVM errors):

kubectl describe pod -l app.kubernetes.io/name=elasticsearch
kubectl logs -l app.kubernetes.io/name=elasticsearch

Authentication failed:

kubectl get secret urbalurba-secrets -o jsonpath="{.data.ELASTICSEARCH_PASSWORD}" | base64 -d

Cluster status yellow/red:

kubectl exec -it elasticsearch-master-0 -- curl -u "elastic:$ES_PASSWORD" -s \
"http://localhost:9200/_cat/indices?v&health=yellow,red"

Learn More