Unable to use env variable with multiple hosts, for ES hosts output

Hi,
I'm running logstash in a k8s cluster using the logstash helm chart.

I have a .env file from which I create a k8s secret, which is used within logstash.

in my .env, I have my hosts defined like:
ES_NODES="elk1.host.cloud.com elk2.host.cloud.com elk3.host.cloud.com"

and in elastic ouput:
hosts => "${ES_NODES}"

This should be correct,
according to an older topic

Yet all I get is the error:

Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"Java::JavaLang::IllegalStateException", :message=>"Unable to configure plugins: Illegal character in scheme name at index 0: \"elk1.host.cloud.com"

Is this k8s specific problem?

Hello,

As per the post shared could you please try to use below :

ES_NODES="https://host-01:9200 https://host-02:9200 https://host-03:9200"

Thanks!!

I seem to have tried with this pattern as well, but got the same result.

For now I added a separate secret with separate hosts.