File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
content/en/docs/tasks/network Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -117,10 +117,15 @@ with the additional entries specified at the bottom.
117
117
118
118
## Why does the kubelet manage the hosts file? {#why-does-kubelet-manage-the-hosts-file}
119
119
120
- The kubelet [ manages] ( https://github.com/kubernetes/kubernetes/issues/14633 ) the
121
- ` hosts ` file for each container of the Pod to prevent Docker from
122
- [ modifying] ( https://github.com/moby/moby/issues/17190 ) the file after the
123
- containers have already been started.
120
+ The kubelet manages the
121
+ ` hosts ` file for each container of the Pod to prevent the container runtime from
122
+ modifying the file after the containers have already been started.
123
+ Historically, Kubernetes always used Docker Engine as its container runtime, and Docker Engine would
124
+ then modify the ` /etc/hosts ` file after each container had started.
125
+
126
+ Current Kubernetes can use a variety of container runtimes; even so, the kubelet manages the
127
+ hosts file within each container so that the outcome is as intended regardless of which
128
+ container runtime you use.
124
129
125
130
{{< caution >}}
126
131
Avoid making manual changes to the hosts file inside a container.
You can’t perform that action at this time.
0 commit comments