RousselTMLEARNING

Article · Elasticsearch: from discovery to expertise

Elasticsearch on Kubernetes with ECK

1. Installing the operator #

CRDs and operator.

Installation #

ECK architecture
kubectl create -f https://download.elastic.co/downloads/eck/2.16.1/crds.yaml
kubectl apply  -f https://download.elastic.co/downloads/eck/2.16.1/operator.yaml
kubectl -n elastic-system logs statefulset/elastic-operator
Good to know: Replace the ECK version with the latest published one; it determines the supported Stack versions.

2. Declaring a cluster #

nodeSets and volumes.

Manifest #

apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata: { name: logs }
spec:
  version: 8.17.0
  nodeSets:
    - name: master
      count: 3
      config: { node.roles: [ master ] }
      volumeClaimTemplates:
        - metadata: { name: elasticsearch-data }
          spec: { accessModes: [ ReadWriteOnce ], resources: { requests: { storage: 10Gi } } }
    - name: hot
      count: 3
      config: { node.roles: [ data_hot, data_content, ingest ] }
      podTemplate:
        spec:
          containers:
            - name: elasticsearch
              resources: { requests: { memory: 8Gi, cpu: 2 }, limits: { memory: 8Gi } }
      volumeClaimTemplates:
        - metadata: { name: elasticsearch-data }
          spec: { accessModes: [ ReadWriteOnce ], storageClassName: fast-ssd, resources: { requests: { storage: 500Gi } } }
---
apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata: { name: logs }
spec: { version: 8.17.0, count: 1, elasticsearchRef: { name: logs } }
kubectl get elasticsearch
kubectl get secret logs-es-elastic-user -o go-template='{{.data.elastic | base64decode}}' 

3. Operating #

Upgrades and pitfalls.

Practices #

  • Upgrade: change spec.version; ECK restarts pods one by one while respecting cluster health.
  • Resize a nodeSet: change count; ECK migrates data before deleting a pod.
  • TLS and the elastic user are generated automatically; custom certificates are possible.
  • Per-node anti-affinity and spreading across zones (topologySpreadConstraints) for high availability.
Common mistake: A StorageClass with reclaimPolicy: Delete destroys data when the cluster is deleted. For production, use Retain and snapshots.

📄 Elasticsearch on Kubernetes with ECK: deployment, persistent storage and upgrades →

My progress

  • ⏱ Estimated time : ≈ 6 min

Sign in to track your progress and take notes. Sign in

⭐ Rate this lesson

5.0 initial rating from the teaching team

Sign in to rate this lesson →

💬 Recent discussions about this course

Ask a question about this lesson →See all discussions about this course

Course Glossary

RBAC (Role-Based Access Control)

An access control method where permissions are assigned to specific roles (e.g., admin, reader) rather than directly to individual users.

Authentication

The process of verifying the identity of a user or system (e.g., login/password, tokens, biometrics).

Authorization

The process that occurs after authentication to determine if the entity has the necessary rights and privileges to access a resource.

API Key

A unique alphanumeric code used to identify, authenticate, and authorize access to an Application Programming Interface (API).

Architecture

The overall structural design of an IT system, defining its various components, their relationships, and the principles guiding its evolution.

Repository

A centralized storage location. This can refer to a source code repository (e.g., Git) or an artifact and binary repository (e.g., Harbor, Nexus, Arti...

Elasticsearch

A distributed, RESTful search and analytics engine capable of addressing a growing number of use cases, built on Apache Lucene.

Recommended Articles

Logstash: enrich, test, monitor and deploy on Kubernetes

Enrich with translate, geoip and elasticsearch, consume Kafka, test pipelines, monitor Logstash a...

Automation and infrastructure as code for Elasticsearch: API, Terraform, Ansible and CI/CD

Automate Elasticsearch administration: REST API and clients, the elasticstack Terraform provider ...

OpenTelemetry traces in Elasticsearch and Kibana APM

Instrument applications with OpenTelemetry or EDOT SDKs, send traces to Elasticsearch, get Kibana...

Transforms and enrich: summarising and enriching data in Elasticsearch

Build entity-centric indices with pivot and latest transforms, and enrich documents at ingest tim...

Logstash in production: persistent queues, DLQ and multiple pipelines

Make Logstash reliable in production: persistent queue, dead letter queue, multiple pipelines and...

Elastic Agent on Kubernetes

Deploy Elastic Agent on Kubernetes: Fleet-managed DaemonSet, Kubernetes integration, kube-state-m...

Grafana Loki vs Elasticsearch: the battle of log storage

A comparison between Loki, the Prometheus-inspired log system, and Elasticsearch, the reference f...

OpenTelemetry metrics in Elasticsearch

Collect host, Kubernetes and application metrics with OpenTelemetry, understand temporality and t...

OpenTelemetry and Elasticsearch: compatibility and architecture

Send OpenTelemetry to Elasticsearch: Collector and elasticsearch exporter, managed OTLP endpoint,...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!