RedHat elastic search image in openshift

Hello i'm trying to setup an Elasticsearch and a kibana on openshift and i used a redhat image but when i go to the pod and i see what's inside elasticsearch.yml i find this :

**cat  elasticsearch.yml**
**cluster.name: "docker-cluster"**
**network.host: 0.0.0.0**

and i define this env variables in my deployement :

      env:
        - name: ingest.geoip.downloader.enabled
          value: 'false'
        - name: xpack.security.enabled
          value: 'false'
        - name: >-
            cluster.routing.allocation.disk.watermark.enable_for_single_data_node
          value: 'true'
        - name: elasticsearch-xpack
          value: disabled
        - name: xpack.monitoring.collection.enabled
          value: 'true'
        - name: xpack.security.transport.ssl.enabled
          value: 'false'
        - name: bootstrap.memory_lock
          value: 'true'
        - name: discovery.type
          value: single-node
        - name: cluster.name
          value: Uat-Openshift

my question is why i can't find anything in the elasticsearch.yaml inside the pod and where are the env variable are typed ? and should i use a deployment or a statefull in openshift and why ?

The environment variables you set in OpenShift for Elasticsearch are applied at runtime and won't show up in the elasticsearch.yml file within the pod. For deploying Elasticsearch on OpenShift, use a StatefulSet because it handles persistent storage, stable network identities, and orderly scaling better than a Deployment.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.