mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00:00
Merge pull request #42376 from jingxu97/Feb/mounter
Automatic merge from submit-queue (batch tested with PRs 43558, 48261, 42376, 46803, 47058) Add bind mount /etc/resolv.conf from host to containerized mounter Currently, in containerized mounter rootfs, there is no DNS setup. If client try to set up volume with host name instead of IP address, it will fail to resolve the host name. By bind mount the host's /etc/resolv.conf to mounter rootfs, VM hosts name could be resolved when using host name during mount. ```release-note Fixes issue where you could not mount NFS or glusterFS volumes using hostnames on GCI/GKE with COS images. ```
This commit is contained in:
commit
87c6fb5de2
@ -1186,6 +1186,7 @@ function prepare-mounter-rootfs {
|
||||
mount --make-rshared "${CONTAINERIZED_MOUNTER_ROOTFS}/var/lib/kubelet"
|
||||
mount --bind -o ro /proc "${CONTAINERIZED_MOUNTER_ROOTFS}/proc"
|
||||
mount --bind -o ro /dev "${CONTAINERIZED_MOUNTER_ROOTFS}/dev"
|
||||
mount --bind -o ro /etc/resolv.conf "${CONTAINERIZED_MOUNTER_ROOTFS}/etc/resolv.conf"
|
||||
}
|
||||
|
||||
# A helper function for removing salt configuration and comments from a file.
|
||||
|
Loading…
Reference in New Issue
Block a user