-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Labels
area/networkingNetworkingNetworkingarea/networking/dnsNetworkingNetworkingkind/enhancementEnhancements are not bugs or new features but can improve usability or performance.Enhancements are not bugs or new features but can improve usability or performance.
Milestone
Description
Description
After restarting the /pause container of a Kubernetes pod, the pod's DNS settings will change to those of the host machine.
Reproduce
$ kubectl run testpod --image=busybox -- sleep 3600
$ docker ps -a | grep testpod
ef9bb3c69dfa busybox "/docker-entrypoint.…" 2 minutes ago Up 2 minutes k8s-container_testpod_default_ebb8ace6-84ab-4a28-814c-109c41827908_1
e6868ab3d8ef google_containers/pause:3.9 "/pause" 2 minutes ago Up 2 minutes k8s_POD_testpod_default_ebb8ace6-84ab-4a28-814c-109c41827908_1
this is the pod's ResolvConfPath
$ docker inspect e6868ab3d8ef | grep ResolvConfPath
"ResolvConfPath": "/var/lib/docker/containers/e6868ab3d8ef8fa1238a82a15faa88b1d13967a71a1e16c99618663610d21286/resolv.conf",
$ cat /var/lib/docker/containers/e6868ab3d8ef8fa1238a82a15faa88b1d13967a71a1e16c99618663610d21286/resolv.conf
nameserver 10.96.0.10
search default.svc.cluster.local. svc.cluster.local. cluster.local.
options ndots:5
$ docker restart e6868ab3d8ef
e6868ab3d8ef
after restart /pause
$ cat /var/lib/docker/containers/e6868ab3d8ef8fa1238a82a15faa88b1d13967a71a1e16c99618663610d21286/resolv.conf
# Generated by Docker Engine.
# This file can be edited; Docker Engine will not make further changes once it
# has been modified.
nameserver 223.5.5.5
# Based on host file: '/etc/resolv.conf' (legacy)
# Overrides: []
Expected behavior
content of ResolvConfPath will no change after restart /pause
docker version
>= 23.0.0docker info
anyAdditional Info
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/networkingNetworkingNetworkingarea/networking/dnsNetworkingNetworkingkind/enhancementEnhancements are not bugs or new features but can improve usability or performance.Enhancements are not bugs or new features but can improve usability or performance.
Type
Projects
Status
Complete