Azure AKS how to test local dns enabled

After turning on localdns on your specific nodepool, we can use the following method to test if it is turned on.  Let's use the yaml here to place our pod into the nodepool. 


apiVersion: v1
kind: Pod
metadata:
  name: dnstest-specific-node
spec:
  nodeName: <your-node-name> # Forces the pod onto this specific node
  containers:
  - name: test
    image: busybox:1.28
    command: ["sleep", "3600"]


And then run kubectl apply -f <file-above> 

kubectl apply -f dns-test-node.yaml

kubectl exec -it dnstest-specific-node -- nslookup kubernetes.default


Check the Server field in the output:

  • 169.254.10.10 or 169.254.10.11: The native AKS LocalDNS feature is enabled and actively working.

  • 169.254.20.10: The open-source NodeLocal DNSCache (DaemonSet) is enabled and working.

  • 10.0.0.10 (or similar 10.x.x.10): Local DNS is not enabled. The pod is talking directly to the cluster's centralized CoreDNS service over the networ



Comments

Popular posts from this blog

vllm : Failed to infer device type

android studio kotlin source is null error

gemini cli getting file not defined error