Conceptual understanding of Kubernetes elasticsearch cluster

11/1/2021

I am new into Kubernetes. I have difficulty digesting some concepts in my head. Please help clarifying it. let us say, there is an ElasticSearch cluster running in K8S env with 5 replicas. 1. Will all the pods have identical replicas(data)? Let us say I have 10GB data in my ES, so will there be 50GB approx space taken by 5 replicas in K8S cluster? 2. If I insert/delete a single document/data in my ES, who(which component) is responsible to insert/delete it among all replicas and keep them consistent with each other all the time? 3. Let us say, if a K8S node goes down and hence one replica. I observed a new replica is spinned instantly(5-10 seconds). I understand it as, 10GB of data has to be copied, ES image to be pulled, installed in pod and made consistent with other replicas and then made available. How these all process are done instantly?

Please educate me, if I have conceptual blockage. Thanks in advance.

-- Om Sao
elasticsearch
kubernetes

1 Answer

11/2/2021
  1. only if you enable 5 replicas. the default is 1 replica set
  2. Elasticsearch will handle that internally
  3. it's not instant, it does take time and how long that is depends on what version you are on. take a look at https://www.elastic.co/guide/en/elasticsearch/reference/current/delayed-allocation.html
-- Mark Walkom
Source: StackOverflow