You are looking at the documentation of a prior release. To read the documentation of the latest release, please
visit here.
We use cookies and other similar technology to collect data to improve your experience on our site, as described in our Privacy Policy.
Run Production-Grade Databases on Kubernetes
Backup and Recovery Solution for Kubernetes
Run Production-Grade Vault on Kubernetes
Secure HAProxy Ingress Controller for Kubernetes
Kubernetes Configuration Syncer
Kubernetes Authentication WebHook Server
KubeDB simplifies Provision, Upgrade, Scaling, Volume Expansion, Monitor, Backup, Restore for various Databases in Kubernetes on any Public & Private Cloud
A complete Kubernetes native disaster recovery solution for backup and restore your volumes and databases in Kubernetes on any public and private clouds.
KubeVault is a Git-Ops ready, production-grade solution for deploying and configuring Hashicorp's Vault on Kubernetes.
Secure HAProxy Ingress Controller for Kubernetes
Kubernetes Configuration Syncer
Kubernetes Authentication WebHook Server
New to KubeDB? Please start here.
KubeDB supports providing custom configuration for an Elasticsearch cluster. This tutorial will give you an overview of how custom configuration files for an Elasticsearch cluster are managed in KubeDB.
Elasticsearch is configured using elasticsearch.yml
file. In KubeDB, this file is located in /elasticsearch/config
directory of elasticsearch pods. To know more about configuring the Elasticsearch cluster see here.
KubeDB allows users to provide 4 different configuration files. These are,
master-config.yml: Users can provide master node specific configuration in this file. This configuration will be applied to all master nodes.
client-config.yml: Users can provide client/ingest node specific configuration in this file. This configuration will be applied to all client nodes.
data-config.yml: Users can provide data node specific configuration in this file. This configuration will be applied to all data nodes.
common-config.yml: The user can provide a common configuration file. This configuration will be applied to all nodes in the Elasticsearch cluster.
As KubeDB provides two different way to create an Elasticsearch cluster, this custom configuration will be applied according to respective modes. These are:
With Topology:
When users create an Elasticsearch cluster using KubeDB specifying spec.topology
field, KubeDB creates Elasticsearch nodes according to the specification. In this case, the custom configuration will be applied according to node rule. i.e. configuration of master-config.yml
file will be applied to only master nodes and so on. However, configuration of common-config.yml
file will be applied to all nodes.
Without Topology:
When users create an Elasticsearch cluster using KubeDB without specifying spec.topology
field, KubeDB creates all nodes as combined node, i.e., every node acts as master, client and data node. In this case, configuration from all configuration files will be merged and applied to all nodes. If the same configuration key appears in more than one configuration file, the value from the highest precedence configuration file will be used in elasticsearch.yml
. The precedence order of configuration files from lowest to highest is:
common-config.yml
has the lowest precedence and master-config.yml
has the highest precedence.
At first, you have to create configuration files with name specified earlier with your desired configuration. Then you have to put these files into a volume. You have to specify this volume in spec.configSecret
section while creating Elasticsearch crd. KubeDB will mount this volume into /elasticsearch/custom-config
directory of the elasticsearch pod. Configurations from these files will be merged to elasticsearch.yml
file according to cluster mode described earlier. Finally, Elasticsearch server will use this configuration file.