Update content/en/docs/tasks/network/customize-hosts-file-for-pods.md
Co-authored-by: Tim Bannister <tim@scalefactory.com>pull/47972/head
parent
6be79614a3
commit
4564e7580b
|
@ -13,7 +13,10 @@ min-kubernetes-server-version: 1.7
|
|||
|
||||
Adding entries to a Pod's `/etc/hosts` file provides Pod-level override of hostname resolution when DNS and other options are not applicable. You can add these custom entries with the HostAliases field in PodSpec.
|
||||
|
||||
Modification using the HostAliases field in the PodSpec is recommended because changes
|
||||
The Kubernetes project recommends modifying DNS configuration using the `hostAliases` field
|
||||
(part of the `.spec` for a Pod), and not by using an init container or other means to edit `/etc/hosts`
|
||||
directly.
|
||||
Change made in other ways may be overwritten by the kubelet during Pod creation or restart.
|
||||
made in other ways may be overwritten by the kubelet during Pod creation or restart.
|
||||
|
||||
<!-- steps -->
|
||||
|
|
Loading…
Reference in New Issue