diff --git a/kubernetes/samples/scripts/elasticsearch-and-kibana/README.md b/kubernetes/samples/scripts/elasticsearch-and-kibana/README.md index 7b632328692..e0601a3e20f 100644 --- a/kubernetes/samples/scripts/elasticsearch-and-kibana/README.md +++ b/kubernetes/samples/scripts/elasticsearch-and-kibana/README.md @@ -15,6 +15,11 @@ It runs the Elastic Stack on the same host and port that the operator's Helm cha to, therefore, you only need to set `elkIntegrationEnabled` to `true` in your `values.yaml` file. +To control Elasticsearch memory parameters (Heap allocation and Enabling/Disabling swapping) please open the file `elasticsearch_and_kibana.yaml`, search for env variables of the elasticsearch container and change the values of the following. + +* ES_JAVA_OPTS: value may contain for example -Xms512m -Xmx512m to lower the default memory usage (please be aware that this value is only applicable for demo purpose and it is not the one recommended by Elasticsearch itself) +* bootstrap.memory_lock: value may contain true (enables the usage of mlockall to try to lock the process address space into RAM, preventing any Elasticsearch memory from being swapped out) or false (disables the usage of mlockall to try to lock the process address space into RAM, preventing any Elasticsearch memory from being swapped out). + To install Elasticsearch and Kibana, use: ``` $ kubectl apply -f kubernetes/samples/scripts/elasticsearch-and-kibana/elasticsearch_and_kibana.yaml diff --git a/kubernetes/samples/scripts/elasticsearch-and-kibana/elasticsearch_and_kibana.yaml b/kubernetes/samples/scripts/elasticsearch-and-kibana/elasticsearch_and_kibana.yaml index 63eee2afd77..79ee144ebb6 100644 --- a/kubernetes/samples/scripts/elasticsearch-and-kibana/elasticsearch_and_kibana.yaml +++ b/kubernetes/samples/scripts/elasticsearch-and-kibana/elasticsearch_and_kibana.yaml @@ -47,6 +47,11 @@ spec: ports: - containerPort: 9200 - containerPort: 9300 + env: + - name: ES_JAVA_OPTS + value: -Xms2014m -Xmx1024m + - name: bootstrap.memory_lock + value: "true" --- kind: "Service"