Cannot Grep DNS

I am following this guideline to install CKF: Install behind a web proxy | Documentation | Charmed Kubeflow After I run this command:

sudo microk8s enable dns:$(resolvectl status | grep "Current DNS Server" | awk '{print $NF}')

I found the DNS doesn’t work properly, because

resolvectl status | grep "Current DNS Server"

outputs nothing. I am using ubuntu 22.04, and here is my DNS config:

resolvectl status 
Global
       Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: foreign
     DNS Servers: 8.8.8.8

Link 2 (enp4s0)
Current Scopes: DNS
     Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
   DNS Servers: 192.168.31.1

Anyone could help to suggest the right way to config DNS?