You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
15
15
16
-
Modification not using HostAliases is not suggested because the file is managed by the kubelet and can be overwritten on during Pod creation/restart.
17
-
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.
20
+
made in other ways may be overwritten by the kubelet during Pod creation or restart.
0 commit comments