I want to set the hostname in a container running inside Kubernetes, but Kubernetes appears to be overriding whatever I set at runtime.
I've tried both setting /etc/hostname in the docker image I'm having Kubernetes use, and including echo "host.example.com > /etc/hostname"
in the CMD in the Dockerfile.
There appears to be a docker flag -h
to set the hostname. Is there a way for me to specify in my replication controller that it should start the container with a special flag?
The container's Debian, if it helps.