From 4564e7580b89ce17bcc7d288f0d0392ce0f6f62b Mon Sep 17 00:00:00 2001 From: HITMAN <112652819+ayushpatil2122@users.noreply.github.com> Date: Wed, 18 Sep 2024 22:01:42 +0530 Subject: [PATCH] Update content/en/docs/tasks/network/customize-hosts-file-for-pods.md Co-authored-by: Tim Bannister --- .../en/docs/tasks/network/customize-hosts-file-for-pods.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/content/en/docs/tasks/network/customize-hosts-file-for-pods.md b/content/en/docs/tasks/network/customize-hosts-file-for-pods.md index bd45a4975e..507397d7ea 100644 --- a/content/en/docs/tasks/network/customize-hosts-file-for-pods.md +++ b/content/en/docs/tasks/network/customize-hosts-file-for-pods.md @@ -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.