Recall & Review
beginner
What is service discovery in Kubernetes?
Service discovery is the process that allows applications to find and communicate with each other automatically within a Kubernetes cluster.
Click to reveal answer
beginner
How does Kubernetes use DNS for service discovery?
Kubernetes automatically creates DNS entries for services, so pods can find services by their DNS names instead of IP addresses.
Click to reveal answer
intermediate
What is the DNS name format for a Kubernetes service?
The DNS name format is .<namespace>.svc.cluster.local, where is the service's name and <namespace> is its namespace.
Click to reveal answer
intermediate
What role does CoreDNS play in Kubernetes service discovery?
CoreDNS is the DNS server inside Kubernetes that answers DNS queries for services and pods, enabling service discovery via DNS.
Click to reveal answer
beginner
Why is DNS-based service discovery preferred over hardcoding IP addresses?
Because IP addresses can change when pods restart or move, DNS names provide a stable way to find services without manual updates.
Click to reveal answer
What is the default DNS suffix for services in Kubernetes?
✗ Incorrect
The default DNS suffix for Kubernetes services is svc.cluster.local.
Which Kubernetes component handles DNS queries for service discovery?
✗ Incorrect
CoreDNS is the DNS server that handles service discovery DNS queries in Kubernetes.
How can a pod find a service named 'web' in the 'default' namespace?
✗ Incorrect
The correct DNS name format is ..svc.cluster.local, so 'web.default.svc.cluster.local' is correct.
Why should you avoid hardcoding service IP addresses in your application?
✗ Incorrect
Pods and services can get new IPs, so hardcoding IPs can break communication.
What happens if CoreDNS is not running in a Kubernetes cluster?
✗ Incorrect
Without CoreDNS, DNS queries for services fail, breaking service discovery.
Explain how DNS-based service discovery works in Kubernetes.
Think about how pods find each other without knowing IP addresses.
You got /4 concepts.
Why is using DNS for service discovery better than using fixed IP addresses in Kubernetes?
Consider what happens when pods restart or move.
You got /4 concepts.