mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-13 21:25:09 +00:00
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.
This commit is contained in:
@@ -890,6 +890,7 @@ function prepare-mounter-rootfs {
|
|||||||
mount --make-rshared "${CONTAINERIZED_MOUNTER_ROOTFS}/var/lib/kubelet"
|
mount --make-rshared "${CONTAINERIZED_MOUNTER_ROOTFS}/var/lib/kubelet"
|
||||||
mount --bind -o ro /proc "${CONTAINERIZED_MOUNTER_ROOTFS}/proc"
|
mount --bind -o ro /proc "${CONTAINERIZED_MOUNTER_ROOTFS}/proc"
|
||||||
mount --bind -o ro /dev "${CONTAINERIZED_MOUNTER_ROOTFS}/dev"
|
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.
|
# A helper function for removing salt configuration and comments from a file.
|
||||||
|
Reference in New Issue
Block a user