Coredns / openshiftdns add host entry
Kubernetes doesn't use /etc/hosts in order to achieve similar you can add a host entry to coredns or openshiftdns ( based on core dns ).
To do this you need to add a entry to coredns configmap normaly in the kube-system namespace .
Example of a entry for my 192.168.178.170
kubernetes cluster.local in-addr.arpa ip6.arpa {
pods insecure
fallthrough in-addr.arpa ip6.arpa
}
hosts {
192.168.178.170 unit0-tenant0.instana.fritz.box
fallthrough
}
prometheus 127.0.0.1:9153
forward . /etc/resolv.conf {