KCNA Kubernetes Architecture & Components 4 — Questions and Answers
Question 1: What does kube-proxy use by default to implement Kubernetes Service networking on modern Linux nodes?
- iptables rules (Correct answer)
- IPVS (IP Virtual Server)
- eBPF directly
- userspace proxying
Correct answer: iptables rules
By default, kube-proxy uses iptables rules to intercept traffic destined for Service ClusterIPs and redirect it to backend Pod IPs.
Question 2: Which Kubernetes API group contains core objects like Pods, Services, and ConfigMaps?
- /apis/apps/v1
- /api/v1 (core group) (Correct answer)
- /apis/batch/v1
- /apis/networking.k8s.io/v1
Correct answer: /api/v1 (core group)
Core objects like Pods, Services, Namespaces, and ConfigMaps belong to the core API group, accessed at /api/v1, not /apis.
Question 3: What is a Kubernetes Operator pattern?
- A built-in Kubernetes role for cluster administrators
- A method of packaging, deploying, and managing applications using custom controllers and CRDs (Correct answer)
- A way to run multiple clusters from a single control plane
- A network policy enforcement mechanism
Correct answer: A method of packaging, deploying, and managing applications using custom controllers and CRDs
The Operator pattern extends Kubernetes with custom controllers that encode operational knowledge about an application using Custom Resource Definitions.
Question 4: Which admission controller is responsible for setting default values on Pods that do not specify resource requests and limits?
- NamespaceLifecycle
- LimitRanger (Correct answer)
- ResourceQuota
- PodSecurity
Correct answer: LimitRanger
LimitRanger enforces default resource requests and limits on Pods in a namespace when LimitRange objects are defined.
Question 5: What is the purpose of a PodDisruptionBudget (PDB) in Kubernetes?
- To limit CPU usage per Pod
- To ensure a minimum number of Pods remain available during voluntary disruptions (Correct answer)
- To schedule Pods away from nodes under maintenance
- To set maximum resource quotas for a namespace
Correct answer: To ensure a minimum number of Pods remain available during voluntary disruptions
A PodDisruptionBudget limits the number of Pods of a replicated application that can be voluntarily disrupted simultaneously during operations like node draining.
Question 6: When you run `kubectl drain <node>`, what happens to DaemonSet-managed Pods on that node by default?
- They are evicted and rescheduled on other nodes
- They are ignored unless you pass --ignore-daemonsets (Correct answer)
- They prevent the drain from completing
- They are automatically deleted permanently
Correct answer: They are ignored unless you pass --ignore-daemonsets
By default, kubectl drain refuses to proceed if DaemonSet-managed Pods are present; passing --ignore-daemonsets skips them since they cannot be rescheduled elsewhere.
Question 7: Which feature allows Kubernetes to automatically adjust the number of Pod replicas based on CPU or custom metrics?
- VerticalPodAutoscaler
- HorizontalPodAutoscaler (Correct answer)
- ClusterAutoscaler
- PodAutoscaler
Correct answer: HorizontalPodAutoscaler
The HorizontalPodAutoscaler (HPA) automatically scales the number of Pod replicas in a Deployment or ReplicaSet based on observed metrics like CPU utilization.
What does kube-proxy use by default to implement Kubernetes Service networking on modern Linux nodes?