Control Plane Components Quiz
Quiz
# etcd cluster configuration
# Goal: Tolerate 2 failures
# Formula: Quorum = (N/2) + 1
# Quorum must be > 50% of total nodes
# If 2 nodes can fail, how many total nodes needed?Reconciliation Loop is the continuous process where controllers compare the desired state (from resource specs in etcd) with the actual state (current reality) and take corrective action when they differ.
Key characteristics:
- Runs approximately every 30 seconds
- Event-driven but also periodic
- Ensures self-healing and state enforcement
- Foundation of Kubernetes’ declarative model
Did you get it right?
kubectl taint nodes node1 maintenance=true:_____NoSchedule effect prevents new pods from being scheduled on the node unless they have a matching toleration. Other effects include NoExecute (evicts existing pods) and PreferNoSchedule (soft version). Syntax: kubectl taint nodes <node-name> <key>=<value>:<effect>NoSchedule effect prevents new pods from being scheduled on the node unless they have a matching toleration. Other effects include NoExecute (evicts existing pods) and PreferNoSchedule (soft version). Syntax: kubectl taint nodes <node-name> <key>=<value>:<effect>Node Controller, Endpoints Controller, Deployment Controller, and StatefulSet Controller (among others). Ingress Controller and Service Mesh Controller are typically separate components deployed in the cluster, not part of the core controller manager.Node Controller, Endpoints Controller, Deployment Controller, and StatefulSet Controller (among others). Ingress Controller and Service Mesh Controller are typically separate components deployed in the cluster, not part of the core controller manager.replicas: 5 but only 3 pods are currently running. What action will the Deployment Controller take?apiVersion: apps/v1
kind: Deployment
metadata:
name: web-app
spec:
replicas: 5
# Current state: 3 pods runningRaft Consensus Algorithm ensures consistency across the distributed etcd cluster.
How it works:
- Elects a leader among etcd nodes
- Leader handles all write operations
- Writes must be acknowledged by quorum (majority)
- Guarantees strong consistency
- Automatically handles leader failures
Why it matters: Prevents split-brain scenarios and ensures all nodes agree on the cluster state even during network partitions or node failures.
Did you get it right?
ETCDCTL_API=3 etcdctl _____ save snapshot.dbetcdctl snapshot save. The snapshot subcommand creates a point-in-time backup of the etcd database. This is critical for disaster recovery since etcd stores all cluster state.etcdctl snapshot save. The snapshot subcommand creates a point-in-time backup of the etcd database. This is critical for disaster recovery since etcd stores all cluster state.# Control plane status:
# kube-api-server: DOWN โ
# kube-scheduler: UP โ
# kube-controller-manager: UP โ
# etcd: UP โ
$ kubectl get podsNode Affinity places pods based on node labels (not topology-aware).
requiredDuringSchedulingIgnoredDuringExecution: Hard requirement (must match)preferredDuringSchedulingIgnoredDuringExecution: Soft preference (best effort)
Pod Affinity/Anti-Affinity places pods based on other podsโ labels and where those pods are running. It is topology-aware via topologyKey (e.g., node, zone).
- Affinity: Schedule near certain pods (e.g., same zone)
- Anti-Affinity: Schedule away from certain pods (e.g., spread replicas)
Use cases:
- Affinity: Co-locate related services for low latency
- Anti-Affinity: Spread replicas for high availability
Did you get it right?
apiVersion: v1
kind: Pod
metadata:
name: web-pod
spec:
nodeSelector:
disktype: ssd
zone: us-east-1a
containers:
- name: nginx
image: nginxdisktype=ssd AND zone=us-east-1a labels for this pod to be scheduled on it. If any label is missing or has a different value, the node is filtered out during the scheduling filtering phase.disktype=ssd AND zone=us-east-1a labels for this pod to be scheduled on it. If any label is missing or has a different value, the node is filtered out during the scheduling filtering phase.Mutating Admission Controllers modify requests before they’re persisted.
- Run FIRST in admission pipeline
- Examples: Add default values, inject labels, add sidecars
- Can change the resource definition
Validating Admission Controllers validate requests without modifying them.
- Run AFTER mutating controllers
- Examples: Enforce policies, check quotas, validate custom rules
- Can only accept or reject requests
Pipeline: Request โ Mutating โ Validating โ Validation โ etcd
Example: A mutating webhook might inject an Istio sidecar, then a validating webhook ensures the pod doesn’t exceed namespace resource quotas.
Did you get it right?
spec:
tolerations:
- key: "key"
operator: "Equal"
value: "value"
_____: "NoSchedule"effect field in tolerations specifies which taint effect this toleration applies to (NoSchedule, NoExecute, or PreferNoSchedule). The toleration must match the taint’s key, value, and effect for the pod to be scheduled on the tainted node.effect field in tolerations specifies which taint effect this toleration applies to (NoSchedule, NoExecute, or PreferNoSchedule). The toleration must match the taint’s key, value, and effect for the pod to be scheduled on the tainted node.