Bird
0
0

In Kubernetes, what must be done to enable a pod in namespace alpha to successfully send requests to a service in namespace beta?

easy📝 Conceptual Q1 of 15
Kubernetes - Namespaces
In Kubernetes, what must be done to enable a pod in namespace alpha to successfully send requests to a service in namespace beta?
AUse the full DNS name including the target service's namespace
BCreate a pod with the same name in both namespaces
CDeploy the service as a ClusterIP with the same name in both namespaces
DConfigure the pod to use host networking mode
Step-by-Step Solution
Solution:
  1. Step 1: Understand Kubernetes DNS resolution

    Services in different namespaces require fully qualified domain names (FQDN) to be accessed cross-namespace.
  2. Step 2: Use the correct DNS format

    The format is service.namespace.svc.cluster.local, which includes the target service's namespace.
  3. Final Answer:

    Use the full DNS name including the target service's namespace -> Option A
  4. Quick Check:

    Cross-namespace service access requires full DNS name [OK]
Quick Trick: Always use full DNS names for cross-namespace service access [OK]
Common Mistakes:
  • Assuming service name alone works across namespaces
  • Using host networking to bypass namespace isolation
  • Creating duplicate pods or services in multiple namespaces

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes