diff --git a/pkg/server/sandbox_run_unix.go b/pkg/server/sandbox_run_unix.go index 9bcd94d1b..f8d690907 100644 --- a/pkg/server/sandbox_run_unix.go +++ b/pkg/server/sandbox_run_unix.go @@ -108,6 +108,13 @@ func (c *criService) sandboxContainerSpec(id string, config *runtime.PodSandboxC Type: "bind", Options: []string{"rbind", "ro"}, }, + // Add resolv.conf for katacontainers to setup the DNS of pod VM properly. + { + Source: c.getResolvPath(id), + Destination: resolvConfPath, + Type: "bind", + Options: []string{"rbind", "ro"}, + }, })) selinuxOpt := securityContext.GetSelinuxOptions()