0
0
Kubernetesdevops~5 mins

Cross-namespace communication in Kubernetes - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a Kubernetes namespace?
A namespace in Kubernetes is like a separate room in a big house. It helps organize and isolate resources like pods and services so they don't mix with others.
Click to reveal answer
beginner
How can pods in one namespace communicate with pods in another namespace?
Pods can talk across namespaces by using the full service name, which includes the service name and the namespace, like service-name.namespace.svc.cluster.local.
Click to reveal answer
beginner
What is the default DNS format to access a service in another namespace?
The format is <service-name>.<namespace>.svc.cluster.local. This tells Kubernetes exactly where to find the service.
Click to reveal answer
intermediate
Why might you want to restrict cross-namespace communication?
To keep things safe and organized, you might limit communication so only certain namespaces can talk to each other. This helps prevent mistakes or security problems.
Click to reveal answer
intermediate
How can Network Policies help with cross-namespace communication?
Network Policies can control which pods in one namespace can connect to pods in another. They act like traffic rules to allow or block communication.
Click to reveal answer
What is the correct DNS name format to access a service named 'web' in namespace 'frontend'?
Aweb.frontend.svc.cluster.local
Bfrontend.web.svc.cluster.local
Cweb.svc.frontend.cluster.local
Dfrontend.web.cluster.local
By default, can pods in different namespaces communicate without extra configuration?
AYes, they can communicate using service DNS names
BNo, communication is blocked by default
COnly if they are in the same node
DOnly if Network Policies allow it
What Kubernetes feature can restrict cross-namespace pod communication?
AConfigMaps
BNamespaces
CNetwork Policies
DPersistent Volumes
If a pod in namespace 'A' wants to call a service in namespace 'B', what must it use?
AOnly the service name
BThe full service DNS name including namespace
CThe pod IP address
DThe node IP address
What is a simple way to test cross-namespace communication?
ACreate a ConfigMap
BRestart the Kubernetes cluster
CDelete the namespace
DUse a pod in one namespace to ping a service in another namespace
Explain how pods in different Kubernetes namespaces can communicate with each other.
Think about how Kubernetes DNS helps find services across namespaces.
You got /3 concepts.
    Describe how Network Policies can control cross-namespace communication and why this might be important.
    Consider how you keep different teams or apps separated safely.
    You got /3 concepts.