Merge pull request #31398 from PurneswarPrasad/patch-1

Changed the explicit mention of Docker due to deprecation in Tasks > …
This commit is contained in:
Kubernetes Prow Robot
2022-01-21 08:25:19 -08:00
committed by GitHub
@@ -117,10 +117,15 @@ with the additional entries specified at the bottom.
## Why does the kubelet manage the hosts file? {#why-does-kubelet-manage-the-hosts-file}
The kubelet [manages](https://github.com/kubernetes/kubernetes/issues/14633) the
`hosts` file for each container of the Pod to prevent Docker from
[modifying](https://github.com/moby/moby/issues/17190) the file after the
containers have already been started.
The kubelet manages the
`hosts` file for each container of the Pod to prevent the container runtime from
modifying the file after the containers have already been started.
Historically, Kubernetes always used Docker Engine as its container runtime, and Docker Engine would
then modify the `/etc/hosts` file after each container had started.
Current Kubernetes can use a variety of container runtimes; even so, the kubelet manages the
hosts file within each container so that the outcome is as intended regardless of which
container runtime you use.
{{< caution >}}
Avoid making manual changes to the hosts file inside a container.