Network Debugging for SRE Part.1 — nslookup
Overview
Network Debugging for SRE Part.1 — nslookup
Overview
Network debugging helps keep your systems running smoothly. This guide explains common DNS problems in Kubernetes and regular systems, with helpful tools to fix them.
DNS debugging
We’re going to learn about common DNS problems. DNS issues happen when your computer can’t find the right address for a website. Think of DNS like a phone book for the internet — it changes website names (like google.com) into addresses that computers can read.

google search screen shot
When DNS breaks, it’s like having a phone book with wrong numbers. Your internet might work fine, but you can’t open websites because your computer doesn’t know where to find them. You can’t browse the web even though your internet is working.
We’re going to learn about nslookup, which is a tool that helps find DNS problems in different environments
nslookup
nslookup is a tool that checks if DNS is working correctly. It looks up website names and IP addresses. It helps you find and fix DNS problems.

There are 2 ways to use nslookup
- non-interactive: query a single host or domain by providing it as a command-line argument. It is more easy
- interactive: query multiple domains or hosts and provides more control
This document will focus on non-interactive nslookup examples
Issue
Pods are failing with Connection refused or No such host errors in k8s environment
Debugging
- Check if CoreDNS is working properly by running the commands below. Most DNS problems happen when CoreDNS is not healthy
# 1. Check CoreDNS deployment status
kubectl get deployment coredns -n kube-system
# 2. Check CoreDNS pod status
kubectl get pods -n kube-system -l k8s-app=kube-dns
kubectl describe pod <coredns-pod-name> -n kube-system
# look for OOMKilled, CrashLoopBackOff, or errors
# 3. Check CoreDNS logs
kubectl logs -n kube-system -l k8s-app=kube-dns
# look for errors like "no route to host" or "timeout"
# 4. Check CoreDNS ip and endpoints
kubectl get svc kube-dns -n kube-system
kubectl get endpoints kube-dns -n kube-system
- Verify CoreDNS configuration
# 1. Check CoreDNS ConfigMap
# Reference: https://coredns.io/manual/configuration
kubectl get configmap coredns -n kube-system -o yaml
# Verify the Corefile configuration is correct
# Look for health status or errors
- Test DNS resolution from within CoreDNS pod
# 1. create temp pod to test DNS and sh access in it
kubectl run dns-test --image=busybox:1.28 --rm -it --restart=Never -- sh
nslookup kubernetes.default
nslookup google.com
# should be similar to
# Server: <IP address>
# Address 1: <IP address> kube-dns.kube-system.svc.cluster.local
# Name: kubernetes.default
# Address 1: <IP address> kubernetes.default.svc.cluster.local
- Verify pod’s DNS configuration
# Check the failing pod's DNS settings
kubectl run dns-test --image=busybox:1.28 --rm -it --restart=Never -- cat /etc/resolv.conf
# Should be simliar to:
# nameserver <CoreDNS-service-IP>
# search <namespace>.svc.cluster.local svc.cluster.local cluster.local
# options ndots:5
Issue
failed to access www.google.com from your laptop
Debugging
Run below scripts to check the local dns server is healthy
nslookup www.google.com
Server: UnKnown
Address: 192.168.1.1
*** UnKnown can't find www.google.com: Server failed
This means your computer cannot reach the DNS server configured in your network settings, or your local DNS server isn’t working properly. This can also indicate network connectivity issues between your computer and the DNS server.
nslookup www.google.com
DNS request timed out.
timeout was 2 seconds.
*** Can't find www.google.com: No response from server
When nslookup fails with a timeout, it could be one of these reasons:
- Firewall blocking: A firewall is blocking DNS traffic on port 53
- You can try by temporary disable the firewall

- DNS server down: The DNS server is not working or cannot be reached
- you can check the dns server and
pingit’s ip - Wrong DNS server address: The DNS server IP address is incorrect
nslookup www.google.com 8.8.8.8
Server: 8.8.8.8
Address: 8.8.8.8
Non-authoritative answer:
Name: google.com
Address: 142.250.76.142
When nslookup fails but nslookup with 8.8.8.8 (google dns)works, it means your internet is fine. The problem is with your local DNS server. Your Internet Service Provider (ISP) DNS server cannot resolve the domain name.
Conclusion
Understanding DNS issues is essential for maintaining healthy network operations. Whether you’re working in a Kubernetes environment or debugging DNS on your local machine, nslookup is a powerful tool that helps identify and resolve DNS problems quickly.
Remember that most DNS problems stem from either misconfigured DNS servers, network connectivity issues, or firewall restrictions blocking DNS traffic
I will comeback with more Network debugging tools soon :)
Reference:
https://coredns.io/manual/configuration/
https://kubernetes.io/docs/tasks/administer-cluster/dns-debugging-resolution/
메타데이터
- post_id
- 9647bb98ff30
- slug
- network-debugging-for-sre-part-1-nslookup-9647bb98ff30
- url
- https://medium.com/@jun.seo/network-debugging-for-sre-part-1-nslookup-9647bb98ff30
- canonical_url
- https://medium.com/@jun.seo/network-debugging-for-sre-part-1-nslookup-9647bb98ff30
- author_url
- https://medium.com/@jun.seo
- status
- ok
- fetched_at
- 2026-06-16 19:09:56