mirror of https://github.com/k3s-io/k3s
Add bind mount /etc/resolv.conf from host to containerized mounter
Currently, in containerized mounter rootfs, there is no DNS setup. By bind mount the host's /etc/resolv.conf to mounter rootfs, vm hosts name could be resolved when using host name during mount.pull/6/head
parent
ac22416835
commit
4d6a6ec507
|
@ -890,6 +890,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