Pods failing because of an environment variable

I am spinning up an ECK-based cluster. I haven't set any secureSettings but I had forgotten and set an environment variable named gcs.client.default.credentials_file

The pod fails to start with this error

"Caused by: java.lang.IllegalArgumentException: Setting [gcs.client.default.credentials_file] is a secure setting and must be stored inside the Elasticsearch keystore, but was found inside elasticsearch.yml",
"at org.elasticsearch.common.settings.SecureSetting.get(SecureSetting.java:81) ~[elasticsearch-7.16.2.jar:7.16.2]",
"at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:598) ~[elasticsearch-7.16.2.jar:7.16.2]",
"at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:507) ~[elasticsearch-7.16.2.jar:7.16.2]",
"at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:477) ~[elasticsearch-7.16.2.jar:7.16.2]",
"at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:447) ~[elasticsearch-7.16.2.jar:7.16.2]",
"at org.elasticsearch.common.settings.SettingsModule.<init>(SettingsModule.java:137) ~[elasticsearch-7.16.2.jar:7.16.2]",
"at org.elasticsearch.node.Node.<init>(Node.java:500) ~[elasticsearch-7.16.2.jar:7.16.2]",

Why is that? I have not set anything specific to elasticsearch.yml

Why the mere existence of this env var bothers it?

If I remove the env var, everything seems to work.

Because the env settings are injected into the Elasticsearch.yml configuration startup.

So it automatically recognises any env var with that particular name?

Asking cause I could find this in the source code.

I can't tell u the exact logic. Is refer y to the docs

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