How to whitelist domain in Kubernetes pod using Coredns ACL plugin

How can I use use coredns acl plugin for the domain based access [blocking/allowing] the egress calls ? As per my use case I want to control the outgoing calls from my pod.

something like this :

. {
    acl {
        allow net stackoverflow.com
        block net google.com
    }
}

Or can I use/customize Kubernetes dns service to whitelist the domains for my pods?

Note: I see in my default pods that coredns pod is already present with image: rancher/coredns-coredns:1.8.3. I understand that it comes default with k3s.

PS: I have already explored calico and other network policy but they are not fulfilling my requirement. I am looking for customizing kubernetes network policy or dns service based solution.

Cluster information:

Kubernetes version:
k3s version v1.21.2+k3s1
Cloud being used: Azure
Node(s) CPU architecture, OS, and Version:
k3s Single Node cluster setup with default setup
Installation method: manifest yaml file
Host OS: Ubuntu 18.04
CNI and version: Calico (project-calico: opensource)
Client Version: v3.19.1
Git commit: 6fc0db96
Cluster Version: v3.19.1
Cluster Type: k8s,bgp,kdd

Cluster Configuration:
default k3s configuration
curl -sfL https://get.k3s.io | sh -