-
Bug
-
Resolution: Unresolved
-
Major
-
None
Not sure if this is a bug or just me being to blind to see...
On Pod templates UI I'm using the Raw YAML field with the idea of making a hosts entry within the containers:
apiVersion: v1 kind: Pod spec: hostAliases: - ip: "127.0.0.1" hostnames: - "foo.local"
..but this only seems to work when Yaml merge strategy is set to Override.
As we've defined quite a lot of Pod templates also inheriting from each other Override is not an option.
I've also tried to workaround by directly modifying /etc/hosts via the container's entrypoint with the help of the Command to run field like this:
/bin/sh -c "echo 127.0.0.1 foo.local" >> /etc/hosts"
...unfortunately that also doesn't work as /etc/hosts is managed by Kubernetes and above made entry gets reverted.
Any help is highly appreciated.
Thanks,
Chris