Bird
0
0

In Kubernetes, what DNS name should a pod in the prod namespace use to access a service called webapp within the same namespace?

easy📝 Conceptual Q2 of 15
Kubernetes - Services
In Kubernetes, what DNS name should a pod in the prod namespace use to access a service called webapp within the same namespace?
Awebapp.default.svc.cluster.local
Bwebapp.prod.svc.cluster.local
Cwebapp.svc.cluster.local
Dprod.webapp.svc.cluster.local
Step-by-Step Solution
Solution:
  1. Step 1: Understand Kubernetes DNS naming conventions

    Services are accessible via <service>.<namespace>.svc.cluster.local.
  2. Step 2: Apply to the given service and namespace

    Since the service is webapp in prod namespace, the DNS name is webapp.prod.svc.cluster.local.
  3. Final Answer:

    webapp.prod.svc.cluster.local -> Option B
  4. Quick Check:

    Check namespace and service name order in DNS [OK]
Quick Trick: Service DNS format: service.namespace.svc.cluster.local [OK]
Common Mistakes:
  • Using default namespace instead of prod
  • Omitting the namespace in DNS name
  • Swapping service and namespace order

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes