Skip to content

Commit 4564e75

Browse files
ayushpatil2122Tim Bannister
andauthored
Update content/en/docs/tasks/network/customize-hosts-file-for-pods.md
Co-authored-by: Tim Bannister <[email protected]>
1 parent 6be7961 commit 4564e75

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

content/en/docs/tasks/network/customize-hosts-file-for-pods.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ min-kubernetes-server-version: 1.7
1313

1414
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.
1515

16-
Modification using the HostAliases field in the PodSpec is recommended because changes
16+
The Kubernetes project recommends modifying DNS configuration using the `hostAliases` field
17+
(part of the `.spec` for a Pod), and not by using an init container or other means to edit `/etc/hosts`
18+
directly.
19+
Change made in other ways may be overwritten by the kubelet during Pod creation or restart.
1720
made in other ways may be overwritten by the kubelet during Pod creation or restart.
1821

1922
<!-- steps -->

0 commit comments

Comments
 (0)