This example demonstrates how an external client configures DNS from the connected endpoint. Note: NSE provides DNS by itself. Also, NSE could provide configs for any other external DNS servers(that are not located as sidecar with NSE).
Make sure that you have completed steps from features
Deploy alpine and nse
kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/dns?ref=c91be29099fab1f8376d9ff90c858efd829de35e
Wait for applications ready:
kubectl wait --for=condition=ready --timeout=5m pod dnsutils -n ns-dns
kubectl wait --for=condition=ready --timeout=5m pod -l app=nse-kernel -n ns-dns
Ping from dnsutils to NSE by domain name:
kubectl exec pods/dnsutils -c dnsutils -n ns-dns -- nslookup -norec -nodef my.coredns.service
kubectl exec pods/dnsutils -c dnsutils -n ns-dns -- ping -c 4 my.coredns.service
Validate that default DNS server is working:
kubectl exec pods/dnsutils -c dnsutils -n ns-dns -- dig kubernetes.default A kubernetes.default AAAA | grep "kubernetes.default.svc.cluster.local"
Delete ns:
kubectl delete ns ns-dns