Bird
0
0

A microservice in namespace inventory cannot access a database service in namespace database. The network policy denies cross-namespace traffic. How to fix this?

medium📝 Analysis Q7 of 15
Microservices - Orchestration with Kubernetes
A microservice in namespace inventory cannot access a database service in namespace database. The network policy denies cross-namespace traffic. How to fix this?
ADelete the <code>database</code> namespace
BUpdate the network policy to allow traffic from <code>inventory</code> namespace
CMove both services to the same namespace
DRestart the Kubernetes cluster
Step-by-Step Solution
Solution:
  1. Step 1: Identify cause of access denial

    Network policy denies cross-namespace traffic blocking access.
  2. Step 2: Fix by updating network policy

    Modify network policy to allow traffic from the inventory namespace to database.
  3. Final Answer:

    Update the network policy to allow traffic from inventory namespace -> Option B
  4. Quick Check:

    Network policy controls cross-namespace access [OK]
Quick Trick: Adjust network policies to permit needed cross-namespace traffic [OK]
Common Mistakes:
MISTAKES
  • Deleting namespaces unnecessarily
  • Assuming restart fixes network policies
  • Moving services without policy changes

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes