question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[kibana] Confusion with ELASTICSEARCH_USERNAME env var

See original GitHub issue

Chart version: 7.13.0

Helm Version: 3.6.0

Describe the bug:

Context: use kibana / elasticsearch with security enabled.

As per documentation, https://www.elastic.co/guide/en/kibana/7.13/using-kibana-with-security.html, we must configure kibana like this:

elasticsearch.username: "kibana_system"

Via Docker, it’s possible to configure this via an environnement variable (in this case ELASTICSEARCH_USERNAME).

But the Helm chart is also using ELASTICSEARCH_USERNAME env var to do the readinessProbe curl auth!

https://github.com/elastic/helm-charts/blob/master/kibana/templates/deployment.yaml#L120

Since kibana_system user cannot be used to login on Kibana, this will fail and the pod will never become ready.

values.yaml

  elasticsearchHosts: http://hot-es-client:9200
  extraEnvs:
  - name: ELASTICSEARCH_USERNAME
    valueFrom:
      secretKeyRef:
        key: username
        name: hot-elastic-user-kibana-system
  - name: ELASTICSEARCH_PASSWORD
    valueFrom:
      secretKeyRef:
        key: password
        name: hot-elastic-user-kibana-system

Steps to reproduce:

  1. Enable / setup elasticsearch security
  2. Configure kibana_system user (set password)
  3. Add env to values.Yaml

Expected behavior:

Kibana should run and become ready.

solutions

Change https://github.com/elastic/helm-charts/blob/master/kibana/templates/deployment.yaml#L120 to use a different env. What about KIBANA_USERNAME ?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ebuildycommented, Dec 21, 2021

hello, any news about this one?

As a workaround, I have set values.yaml:

healthCheckPath: /api/status
0reactions
botelastic[bot]commented, Jun 12, 2022

This issue has been automatically closed because it has not had recent activity since being marked as stale.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Elastic Agent environment variables
Use environment variables to configure Elastic Agent when running in a containerized environment. Variables on this page are grouped by action type:.
Read more >
Environment variables for Elasticsearch - IBM
The user name for Elasticsearch authentication. This user has administrator rights in the Kibana user interface. None. ELASTICSEARCH_PASSWORD, The user password ...
Read more >
Change kibana parameter to match Kibana standard
So a docker enviroment of ELASTICSEARCH_PASSWORD becomes elasticsearch.password. So with this in mind READONLYREST_KBN_LOGIN_CUSTOM_LOGO will be ...
Read more >
Elastic Stack 8.0.0-alpha2 Up and Running - Philipp Krenn
Don't get confused by the two default users: The kibana_system one is for Kibana itself, while the elastic one is for you. However,...
Read more >
Signing HTTP requests to Amazon OpenSearch Service
For the correct client version to use, see Elasticsearch client compatibility. ... NewReader(json) // Get credentials from environment variables and create ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found