Elasticsearch Image for Kubernetes addon with no root user requirement
10K+
This repository contains the Mintel docker image that we use , mostly , within Kubernetes
The Image builds on-top of the Official Elasticsearch image and customize the following :
a Python script to manage various aspects of the Elasticsearch lifecycle is provided in /manage-es.py
A simple set of sh script to be used in kubernetes as lifecycle hooks is provided in
pre-stop hook
/stop-data-node.sh
python /manage-es.py pre-stop-data
post-start hook
/start-data-node.sh
python /manage-es.py persitent-settings
python /manage-es.py post-start-data
See the minikube example for a working example of the definition of those hooks
the following action are supported by the python script NOTE: In some cases running this scripts as lifecycle hook can lead to a cluster that can't startup
For example all data action expect to be able to contact the cluster masters before proceeding. Is MASTER and DATA functions are on the same node this will never work
pre-stop-data - Hook for Pre-Stop of a data node
if mode.upper() == "ALLOCATION":
# Sequence:
# - Disable Shard Allocation
# - Perform a Synced Flush
elif mode.upper() == "DRAIN":
# Sequence:
# - set recovery settings
# - drain Node
# - Wait for 0 shards in relocating or initializing status
if mode.upper() == "ALLOCATION":
# Sequence:
# - wait for node to join cluster
# - set recovery settings
# - enable shards allocation
# - Wait for 0 Initializing or Relocating Shards ( Unassigned shards should be ok if this is cold startup of an elasticsearch cluster )
# - remove temporary recovery settings
elif mode.upper() == "DRAIN":
# Sequence:
# - wait for node to join cluster
# - set recovery settings
# - undrain Node
# - Wait for 0 Initializing or Relocating Shards ( Unassigned shards should be ok if this is cold startup of an elasticsearch cluster )
# - remove temporary recovery settings
Not implemented yet
Not implemented yet
If path to a json persitent settings file is provided
push persistent settings to the cluster
ES_PLUGINS_INSTALL="repository-gcs,x-pack"true) ."/backup" (default = []). The value of REPO_LOCATIONS is automatically wrapped within an [] and therefore should not be included in the variable declaration. To specify multiple repository locations simply specify a comma separated string for example "/backup", "/backup2".see example here
Content type
Image
Digest
Size
687.5 MB
Last updated
over 6 years ago
docker pull mintel/elasticsearch