# RedHat elastic search image in openshift

**URL:** https://discuss.elastic.co/t/redhat-elastic-search-image-in-openshift/353769
**Category:** Elasticsearch
**Tags:** docker
**Created:** [February 21, 2024, 10:05am UTC](https://discuss.elastic.co/t/redhat-elastic-search-image-in-openshift/353769 "2024-02-21T10:05:04Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Sohaib\_El\_Mediouni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sohaib_el_mediouni/32/123391_2.png) [@Sohaib\_El\_Mediouni](https://discuss.elastic.co/u/Sohaib_El_Mediouni)
#### Post date: [February 21, 2024, 10:05am UTC](https://discuss.elastic.co/t/redhat-elastic-search-image-in-openshift/353769/1 "2024-02-21T10:05:04Z")

</div>

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 :

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

```

and i define this env variables in my deployement :

```auto
      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 ?

---

<div class="post-metadata">

### Author: ![rtwolfe94022](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rtwolfe94022/32/132253_2.png) [@rtwolfe94022](https://discuss.elastic.co/u/rtwolfe94022)
#### Post date: [March 19, 2024, 3:36am UTC](https://discuss.elastic.co/t/redhat-elastic-search-image-in-openshift/353769/2 "2024-03-19T03:36:56Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [April 16, 2024, 3:37am UTC](https://discuss.elastic.co/t/redhat-elastic-search-image-in-openshift/353769/3 "2024-04-16T03:37:36Z")

</div>

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