Quiz Module 2 - Kubernetes Architecture and Components
Instructions
This quiz contains 30 multiple-choice questions to validate your understanding of Module 2.
Tip: Answer each question before revealing the answer. The answers are hidden just after each question.
Question 1
What is the single entry point for all interactions with a Kubernetes cluster?
See explanation
Correct answer: API Server
Explanation: The API Server is the only component with which users and other cluster components interact directly. All requests go through the API Server.
Question 2
Which component stores all the configuration and state of the Kubernetes cluster?
See explanation
Correct answer: etcd
Explanation: etcd is the distributed database that stores all the configuration and state of the cluster. It is the single source of truth for Kubernetes.
Question 3
Which Control Plane component maintains the desired state of resources?
See explanation
Correct answer: Controller Manager
Explanation: The Controller Manager runs controllers that monitor the cluster's state and take actions to match the actual state to the desired state (control loop pattern).
Question 4
Which component assigns Pods to Worker Nodes?
See explanation
Correct answer: Scheduler
Explanation: The Scheduler is responsible for assigning unscheduled Pods to appropriate nodes based on available resources, affinities, and constraints.
Question 5
Which component runs on each Worker Node and manages the Pods?
See explanation
Correct answer: kubelet
Explanation: kubelet is the agent that runs on each Worker Node. It manages the Pods, communicates with the API Server, and performs health checks.
Question 6
Which component manages the networking and load balancing of Services?
See explanation
Correct answer: kube-proxy
Explanation: kube-proxy maintains network rules that allow communication with Services and performs load balancing between backend Pods.
Question 7
Which consensus algorithm does etcd use for high availability?
See explanation
Correct answer: Raft
Explanation: etcd uses the Raft consensus algorithm to ensure consistency and high availability in a distributed cluster.
Question 8
What is the scheduling process of the Scheduler?
See explanation
Correct answer: Filtering → Scoring → Selection → Bind
Explanation: The Scheduler first filters eligible nodes, then scores them, selects the best one, and finally binds the Pod to the selected node.
Question 9
Which interface allows kubelet to communicate with Container Runtimes?
See explanation
Correct answer: CRI (Container Runtime Interface)
Explanation: CRI is the standard interface that allows kubelet to communicate with different Container Runtimes (containerd, CRI-O, etc.) uniformly.
Question 10
Which add-on provides the internal DNS service of the cluster?
See explanation
Correct answer: CoreDNS
Explanation: CoreDNS is the DNS service that resolves internal Service names (e.g., my-service.default.svc.cluster.local).
Question 11
Which Container Runtime is most commonly used in Kubernetes today?
See explanation
Correct answer: containerd
Explanation: containerd has become the standard Container Runtime in Kubernetes. Docker has been deprecated as a direct runtime, although Docker Desktop uses containerd in the background.
Question 12
What is the primary role of the Controller Manager?
See explanation
Correct answer: Maintain the desired state of resources by monitoring and correcting discrepancies
Explanation: The Controller Manager runs controllers that monitor the current state of the cluster and take actions to match the actual state to the desired state (control loop pattern).
Question 13
Which component uses filters and scores to choose the best node for a Pod?
See explanation
Correct answer: Scheduler
Explanation: The Scheduler first filters eligible nodes, then scores them based on criteria like available resources, affinities, and constraints, before selecting the best node.
Question 14
What is the main function of kube-proxy?
See explanation
Correct answer: Maintain network rules for Services and perform load balancing
Explanation: kube-proxy maintains network rules (iptables, IPVS, or userspace) that allow communication with Services and distributes traffic between backend Pods.
Question 15
How many etcd instances are generally needed for high availability?
See explanation
Correct answer: 3 or more (odd number)
Explanation: etcd uses the Raft consensus which requires an odd number of instances (3, 5, 7, etc.) to ensure high availability and avoid split-brain scenarios.
Question 16
What operating modes can kube-proxy use?
See explanation
Correct answer: iptables, IPVS, or userspace
Explanation: kube-proxy can operate in iptables mode (default), IPVS mode (more performant for many Services), or userspace mode (deprecated).
Question 17
Which Kubernetes add-on provides resource metrics for Pods and nodes?
See explanation
Correct answer: Metrics Server
Explanation: Metrics Server collects resource metrics (CPU, memory) from nodes and Pods, enabling the use of HPA (Horizontal Pod Autoscaler) and kubectl top.
Question 18
Which protocol does etcd use for replication?
See explanation
Correct answer: gRPC
Explanation: etcd uses gRPC for communication between cluster members, which is more efficient than HTTP for replication operations.
Question 19
Which Control Plane component can be replicated for high availability?
See explanation
Correct answer: All components (API Server, etcd, Controller Manager, Scheduler)
Explanation: All Control Plane components can be replicated for high availability, with a load balancer in front of the API Servers.
Question 20
Which interface allows network plugins to integrate with Kubernetes?
See explanation
Correct answer: CNI (Container Network Interface)
Explanation: CNI is the standard interface that allows network plugins (Calico, Flannel, Weave, etc.) to integrate with Kubernetes to manage Pod networking.
Question 21
What is the role of the Admission Controller in the API Server?
See explanation
Correct answer: Validate and modify requests before they are persisted in etcd
Explanation: Admission Controllers intercept requests after authentication and authorization to validate, modify, or reject objects before their persistence.
Question 22
Which component runs on each Worker Node and communicates with the API Server?
See explanation
Correct answer: kubelet
Explanation: kubelet is the agent that runs on each Worker Node. It communicates with the API Server to receive Pod specifications and report Pod status.
Question 23
What is the data storage format in etcd?
See explanation
Correct answer: Key-value store with versioning
Explanation: etcd is a distributed key-value store that maintains a history of versions, allowing watch and retrieval of previous states.
Question 24
Which Control Plane component is responsible for resource reconciliation?
See explanation
Correct answer: Controller Manager
Explanation: The Controller Manager runs controllers that monitor the current and desired states, then take actions to reconcile them (control loop pattern).
Question 25
What is the default reconciliation frequency in controllers?
See explanation
Correct answer: Every few seconds (typically 5-10 seconds)
Explanation: Controllers reconcile periodically, usually every 5-10 seconds, to avoid system overload while maintaining responsiveness.
Question 26
What is the role of the watch mechanism in Kubernetes?
See explanation
Correct answer: Allow components to receive real-time notifications of state changes
Explanation: The watch mechanism allows components (kubelet, controllers, etc.) to subscribe to state changes via the API Server, avoiding constant polling.
Question 27
Which Kubernetes add-on provides a web interface to manage the cluster?
See explanation
Correct answer: Kubernetes Dashboard
Explanation: Kubernetes Dashboard is a web interface that allows you to visualize and manage cluster resources graphically.
Question 28
What is the default port of the Kubernetes API Server?
See explanation
Correct answer: 6443 (HTTPS)
Explanation: The API Server listens on port 6443 in HTTPS by default. Port 8080 was used in insecure mode (deprecated).
Question 29
Which component is responsible for managing the lifecycle of containers on a node?
See explanation
Correct answer: kubelet in collaboration with the Container Runtime
Explanation: kubelet receives Pod specifications from the API Server and uses the Container Runtime (via CRI) to create, start, stop, and delete containers.
Question 30
What is the main difference between a high availability Control Plane and a single Control Plane?
See explanation
Correct answer: The replication of Control Plane components with a load balancer
Explanation: A HA Control Plane replicates all components (API Server, etcd, Controller Manager, Scheduler) across multiple machines with a load balancer in front of the API Servers to avoid single points of failure.
Quiz Result
Congratulations on completing the Module 2 quiz!
Score:
- 25-30 correct answers: Excellent! You master Kubernetes architecture.
- 20-24 correct answers: Very good! Review the components where you had difficulties.
- 15-19 correct answers: Good! Review the chapters on architecture.
- Less than 15: Recommended to review the module before continuing.
Next Steps
Now that you have validated your knowledge:
Module 3: Pods and Deployments
Practical Labs: Put the architecture into practice
Quiz created on: December 2024