DNS-Based Service Discovery
Revolut ☯️ Medium Kubernetes
Beginner Mode

Start your terminal to use beginner mode.

Scenario

In namespace disco, the application discovery-app relies on DNS-based discovery of peer pods. The service discovery-svc is supposed to return all backend pod IPs, but currently:

kubectl exec deploy/testpod -n disco -- nslookup discovery-svc.disco.svc.cluster.local

returns only one IP instead of individual pod IPs. The application cannot discover its peers and fails to form a cluster.

Task

Fix the service configuration so that DNS resolution of discovery-svc returns one IP per pod, allowing the application to discover all running instances.

Property Value
Namespace disco
Deployment discovery-app (3 replicas)
Service discovery-svc
Pod label app=discovery

Terminal requires a larger screen

Open this page on a desktop or tablet (≥ 768px) to launch the terminal and practice hands-on.

Kubernetes Environment

Launch a live cluster to solve this challenge.

Sign In

Track

Question Difficulty Company Access
Need more practice in this area? Explore more questions →