Challenge, Easy,  on  Kubernetes

Resolve Service and External DNS Using a Temporary Pod

Scenario

A Service named earth-svc exists in the planet namespace. Use a temporary Pod to perform DNS resolution tasks and save the results to the dev-machine.


Task

  1. Create a temporary Pod named dns-resolve using the busybox:latest image in the planet namespace. From this Pod, run nslookup to resolve the FQDN of earth-svc and save the full output to :
/home/laborant/earth-svc-ip.txt
  1. Verify the saved IP matches the Service's actual ClusterIP
  2. From the same temporary Pod, execute nslookup google.com and save the entire output to :
/home/laborant/google.txt
  1. Confirm the Pod is automatically removed after the tasks are complete

Hint 1
  • The fully qualified domain name (FQDN) of a Service follows the format <service-name>.<namespace>.svc.cluster.local.
  • Use kubectl run with -it, --restart=Never, and --rm to create a temporary Pod and pipe the nslookup output.

See the official docs: DNS for Services and Pods


Test Cases