Project:Elasticsearch-K8s

From MaRDI portal

Elasticsearch Configuration

Overview

The Elasticsearch service is deployed in Kubernetes using a StatefulSet resource, which provides:

  • Persistent storage for index data via PersistentVolumeClaims
  • Stable network identities for pods
  • Ordered deployment and scaling

Architecture

  • Deployment Type: StatefulSet with headless service
  • Storage: Persistent volumes using csi-rbd-sc storage class
  • Configuration: Single-node discovery mode
  • Security: Runs as user 1000 with fsGroup 1000

Service Endpoints

  • HTTP API: Port 9200 (configurable via Values.port)
  • Transport: Port 9300 (cluster communication)
  • Service Type: Headless (ClusterIP: None)

Initial Setup

Index Configuration

After the service is first deployed, recreate the search index from within the Wikibase pod:

# Update search index configuration
php /var/www/html/w/extensions/CirrusSearch/maintenance/UpdateSearchIndexConfig.php --startOver

# Force reindex all content
php /var/www/html/w/extensions/CirrusSearch/maintenance/ForceSearchIndex.php

Configuration Values

Key Helm values that can be customized:

  • replicas: Number of Elasticsearch replicas
  • image.repository & image.tag: Elasticsearch Docker image
  • port: HTTP API port (default: 9200)
  • javaOpts: JVM options (e.g., heap size)
  • resources: CPU and memory requests/limits
  • storage.size: Persistent volume size