digging a bit further - the dns addon enable script looks at the kubelet args for a resolver - if that's not found, it uses a python script to find a resolve.conf file in:
DEFAULT_RESOLV_CONFS = [ "/etc/resolv.conf", "/run/systemd/resolve/resolv.conf", ]
however the snap is strictly confined and can't read these locations - so falls back to the google servers.
https://github.com/canonical/microk8s-core-addons/blob/main/addons/dns/enable
digging a bit further - the dns addon enable script looks at the kubelet args for a resolver - if that's not found, it uses a python script to find a resolve.conf file in:
DEFAULT_ RESOLV_ CONFS = [ resolv. conf", systemd/ resolve/ resolv. conf",
"/etc/
"/run/
]
however the snap is strictly confined and can't read these locations - so falls back to the google servers.
https:/ /github. com/canonical/ microk8s- core-addons/ blob/main/ addons/ dns/enable