KCNA Networking & Service Discovery — Questions and Answers
Question 1: What is the purpose of Kubernetes service discovery?
- To allow services to discover nodes.
- To facilitate communication between pods and services (Correct answer)
- To monitor Kubernetes clusters.
- To optimize the cluster's performance.
Correct answer: To facilitate communication between pods and services
Kubernetes service discovery allows applications running in pods to find and communicate with other services within the cluster without needing to know their specific IP addresses. It achieves this by assigning stable network identities (DNS names and virtual IPs) to services, abstracting away the dynamic nature of pod IPs.
Question 2: Which component manages network communication between Kubernetes Pods?
- Kube-proxy (Correct answer)
- Kubelet.
- Scheduler.
- Controller Manager.
Correct answer: Kube-proxy
Kube-proxy is a network proxy that runs on each node in the Kubernetes cluster. It is responsible for implementing the Kubernetes Service concept, maintaining network rules on the host to enable network communication to your Pods from inside or outside of the cluster.
What is the purpose of Kubernetes service discovery?