Networking & Service Discovery Flashcards
7 cards from real KCNA practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Networking & Service Discovery flashcards as text
Which Kubernetes Service type creates an external load balancer in cloud environments?
Answer: LoadBalancer
The LoadBalancer Service type provisions an external cloud load balancer that routes traffic to the backend pods.
What does a headless Service (ClusterIP: None) return when queried via DNS?
Answer: Individual pod IP addresses as DNS A records
Headless Services bypass kube-proxy and return the individual pod IPs directly as DNS A records, enabling direct pod addressing.
Which field in a NetworkPolicy spec restricts which pods can initiate connections TO the selected pods?
Answer: ingress
The ingress field defines rules for inbound traffic to the selected pods, specifying allowed sources.
In Kubernetes DNS, what is the fully qualified domain name for a Service named 'db' in namespace 'prod'?
Answer: db.prod.svc.cluster.local
Kubernetes DNS follows the pattern ..svc., defaulting to cluster.local.
What is the purpose of kube-proxy in a Kubernetes cluster?
Answer: To maintain iptables/IPVS rules that implement Service virtual IPs
kube-proxy watches the API server and programs iptables or IPVS rules on each node to forward traffic destined for Service ClusterIPs to backend pods.
Which annotation is commonly used to specify an Ingress controller class when multiple controllers exist?
Answer: kubernetes.io/ingress.class
The kubernetes.io/ingress.class annotation (or the newer IngressClassName field) tells Kubernetes which controller should handle a given Ingress resource.
What happens to existing connections when a pod backing a Service is deleted?
Answer: Existing connections may be terminated depending on the protocol and graceful termination period
When a pod is deleted, kube-proxy removes it from endpoints, but already-established TCP connections may be reset depending on the termination grace period and connection tracking.