# Kabana Environment Variables Not Getting Set

**URL:** <https://discuss.elastic.co/t/kabana-environment-variables-not-getting-set/271305>\
**Category:** Kibana\
**Tags:** docker\
**Created:** [April 27, 2021, 1:00am UTC](https://discuss.elastic.co/t/kabana-environment-variables-not-getting-set/271305 "2021-04-27T01:00:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cstewa20](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cstewa20/32/126784_2.png) [@cstewa20](https://discuss.elastic.co/u/cstewa20)\
**Post date:** [April 27, 2021, 1:00am UTC](https://discuss.elastic.co/t/kabana-environment-variables-not-getting-set/271305/1 "2021-04-27T01:00:36Z")

</div>

I'm working on getting kibana to work; however, the environment variables are not getting set, not sure what I'm missing or why they would not be set:

Here is the helm chart I'm working from: [helm-charts/kibana at master · elastic/helm-charts · GitHub](https://github.com/elastic/helm-charts/tree/master/kibana) as the basis.

values.yaml file: changes  
elasticsearchHosts: "[http://logsearch-master:9200](http://logsearch-master:9200)"

I did not change anything here, this just shows where it sets the env settings:  
deployment.yaml file:

```auto
 env:
          {{- if .Values.elasticsearchURL }}
          - name: ELASTICSEARCH_URL
            value: "{{ .Values.elasticsearchURL }}"
          {{- else if .Values.elasticsearchHosts }}
          - name: ELASTICSEARCH_HOSTS
            value: "{{ .Values.elasticsearchHosts }}"
          {{- end }}
          - name: SERVER_HOST
            value: "{{ .Values.serverHost }}"

```

From the container looking at the kabana.yaml file it shows:

```auto
bash-4.4$ cat /opt/kibana/config/kibana.yml 
#
# **THIS IS AN AUTO-GENERATED FILE**
#

# Default Kibana configuration for docker target
server.name: kibana
server.host: "0"
elasticsearch.hosts: ["http://elasticsearch:9200"]
monitoring.ui.container.elasticsearch.enabled: truebash-4.4

```

---

<div class="post-metadata">

**Author:** ![brianseeders](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brianseeders/32/84831_2.png) [@brianseeders](https://discuss.elastic.co/u/brianseeders)\
**Post date:** [May 13, 2021, 6:07pm UTC](https://discuss.elastic.co/t/kabana-environment-variables-not-getting-set/271305/2 "2021-05-13T18:07:10Z")

</div>

Hey @cstewa20,

That file contains a default value, and Kibana _should_ be picking up the value from the environment variable instead.

Can you also customize this in your `values.yaml` to turn on verbose logging?

```auto
# Allows you to add any config files in /usr/share/kibana/config/
# such as kibana.yml
kibanaConfig:
  kibana.yml: |
    logging:
      verbose: true

```

then, if you check the logs for the pod, you should see a lot more information.

I set up a chart with the same settings that you mentioned and turned on verbose logging. Here's what I see:

```nohighlight
✗ kubectl logs kibana-kibana-5c57447df5-5zxsg | grep 'logsearch-master'
{"type":"log","@timestamp":"2021-05-13T18:02:51+00:00","tags":["debug","elasticsearch","query","data"],"pid":943,"message":"[ConnectionError]: getaddrinfo ENOTFOUND logsearch-master"}

```

---

<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:** [June 10, 2021, 6:07pm UTC](https://discuss.elastic.co/t/kabana-environment-variables-not-getting-set/271305/3 "2021-06-10T18:07:52Z")

</div>

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