How to set environment variables for host-containers? #4315
Replies: 2 comments
-
Thanks for reaching out. Setting environment variables on host-containers isn't currently supported in host-containers on Bottlerocket. It is a good feature that we will consider implementing in the future. For now, I have created an issue on our end that we can track and reference for this. |
Beta Was this translation helpful? Give feedback.
-
Hello @vigh-m , Thanks |
Beta Was this translation helpful? Give feedback.
-
Hello,
After checking the documentation, github issues and discussions I didn't find any native way to set environment variables for host-containers.
As of now, it seems that the only way is to specify the needed values in the host-container's user-data and then propagate them in the container's entrypoint.
My use case is monitoring of the instance including its metrics and logs:
The reason for runnning them as a host-containers is to make sure that we have logs and metrics even if the instance hasn't joined the cluster.
This is for audit purpose.
The ability to add environment variables for host-containers would eliminate the need to create custom containers that can process user-data. Instead you would be able to use original container and configure it via environment variables.
Thanks,
Beta Was this translation helpful? Give feedback.
All reactions