Kubernetes MCQ
Test your Kubernetes knowledge with 100 multiple choice questions covering fundamentals to advanced concepts, with instant feedback and explanations.
What is Kubernetes?
2What is the smallest deployable unit in Kubernetes?
3What is a Kubernetes Node?
4What is the role of the Kubernetes "control plane"?
5What command-line tool is commonly used to interact with a Kubernetes cluster?
6What does the command "kubectl get pods" do?
7What is a Kubernetes "Deployment" primarily used for?
8What is a Kubernetes "Service"?
9What does "kubectl apply -f deployment.yaml" do?
10What is a "Namespace" in Kubernetes used for?
11What is the purpose of a "ReplicaSet"?
12What does "kubectl describe pod <pod-name>" provide?
13What is a "ConfigMap" used for in Kubernetes?
14What is a "Secret" in Kubernetes?
15What does the term "kubectl logs <pod-name>" do?
16What is the purpose of a "Label" in Kubernetes?
17What does "kubectl scale deployment <name> --replicas=5" do?
18What is "etcd" in the context of Kubernetes?
19What is the purpose of the "kube-scheduler"?
20What does "kubectl create namespace dev" do?
21What is a "container image" in the context of running workloads in Kubernetes?
22What does "kubectl delete pod <pod-name>" do if the pod is managed by a Deployment?
23What is the difference between a "Pod" and a "container"?
24What does "kubectl get nodes" display?
25What is the role of "kubelet" running on each node?
26What is a "YAML manifest" in Kubernetes?
27What does the "kind" field in a Kubernetes manifest specify?
28What is the purpose of "kubectl port-forward"?
29What is a "Job" in Kubernetes used for?
30What is a "CronJob" in Kubernetes?
31What does the term "desired state" mean in Kubernetes?
32What is the purpose of "kubectl exec -it <pod> -- /bin/bash"?
33What is "Minikube" used for?
34What does the "restartPolicy" field in a Pod spec control?
35What is the difference between "kubectl create" and "kubectl apply"?
36What does a "selector" do in a Kubernetes Service definition?
37What is the purpose of "kubectl rollout status deployment/<name>"?
38What does it mean for Kubernetes to be "cloud-agnostic"?
39What is the purpose of a "readiness probe"?
40What does the abbreviation "K8s" stand for?
What is the difference between a "liveness probe" and a "readiness probe"?
2What is the purpose of a "PersistentVolume" (PV) and "PersistentVolumeClaim" (PVC)?
3What is a "StatefulSet" and how does it differ from a "Deployment"?
4What is the purpose of a Kubernetes "Ingress" resource?
5What are the main types of Kubernetes Services, and what does "ClusterIP" provide?
6What is the purpose of "resource requests" and "resource limits" in a Pod spec?
7What is a "DaemonSet" used for?
8What does the "kubectl rollout undo deployment/<name>" command do?
9What is the purpose of "node affinity" and "node selectors"?
10What is the difference between "Horizontal Pod Autoscaler" (HPA) and "Vertical Pod Autoscaler" (VPA)?
11What is the purpose of "Taints" and "Tolerations" in Kubernetes scheduling?
12What is the purpose of "kubectl get events"?
13What is "Helm" and what problem does it solve?
14What does the "kubectl rollout restart deployment/<name>" command accomplish?
15What is the purpose of an "init container" in a Pod?
16What is a "sidecar container" pattern?
17What does "kubectl top pods" require to function, and what does it display?
18What is the purpose of "Role-Based Access Control" (RBAC) in Kubernetes?
19What is the difference between a "Role" and a "ClusterRole" in RBAC?
20What does the "imagePullPolicy: Always" setting do?
21What is a "Headless Service" in Kubernetes?
22What is the purpose of "kubectl cordon" and "kubectl drain" on a node?
23What is the purpose of a "PodDisruptionBudget" (PDB)?
24How does Kubernetes handle a Pod's restart when it crashes, in terms of "CrashLoopBackOff"?
25What does "kubectl get all -n <namespace>" show, and what is a limitation of using "all" here?
26What is the purpose of "context" in kubectl configuration (kubeconfig)?
27What is the difference between "emptyDir" and "hostPath" volume types?
28What is the purpose of "kubectl apply --dry-run=client -o yaml"?
29What is a "Network Policy" used for in Kubernetes?
30What is the purpose of "annotations" versus "labels" on Kubernetes objects?
31What does the "terminationGracePeriodSeconds" field in a Pod spec control?
32What is "kustomize" used for in Kubernetes configuration management?
33What is the purpose of "QoS classes" (Guaranteed, Burstable, BestEffort) for Pods?
34What does "kubectl edit deployment <name>" do?
35What is the purpose of "ServiceAccounts" in Kubernetes?
36What is the difference between "RollingUpdate" and "Recreate" deployment strategies?
37What is the purpose of the "kubectl explain <resource>" command?
38What is the effect of setting "replicas: 0" on a Deployment?
39What happens when a Pod's container exceeds its memory "limit"?
40What is the purpose of "kubectl wait" in scripts and automation?
How does the Kubernetes "reconciliation loop" (control loop) pattern work, as implemented by controllers?
2What is a "Custom Resource Definition" (CRD), and how does it relate to the "Operator pattern"?
3How does "admission control" fit into the Kubernetes API request lifecycle, and what is the difference between "ValidatingAdmissionWebhook" and "MutatingAdmissionWebhook"?
4What is the role of "etcd" consistency guarantees (via the Raft consensus algorithm) in ensuring Kubernetes cluster reliability?
5What is the difference between "horizontal scaling via HPA based on custom metrics" versus "based on CPU/memory metrics"?
6How does Kubernetes's "Container Network Interface" (CNI) plugin architecture enable different networking implementations (e.g. Calico, Cilium, Flannel)?
7What is the significance of "Pod Security Standards" (or the deprecated PodSecurityPolicy) regarding container privilege levels?
8Why might "ETCD" be deployed as a separate cluster from the Kubernetes control plane nodes in large production environments, and what is the trade-off?
9What is the purpose of "finalizers" on Kubernetes objects, and how do they affect deletion?
10How does "Pod-to-Pod" networking typically work across different nodes in a cluster at a conceptual level (the "Kubernetes networking model")?
11What is "etcd compaction" and why is it necessary?
12What does "topology spread constraints" allow you to configure for Pod scheduling, and how does it differ from anti-affinity?
13What is the purpose of "server-side apply" in Kubernetes, and what problem does it solve compared to "client-side apply"?
14How do "leader election" mechanisms work for Kubernetes controllers (such as kube-controller-manager or custom Operators) running with multiple replicas for high availability?
15What is the significance of "Pod overhead" in the context of running workloads with different container runtimes (e.g. gVisor or Kata Containers via RuntimeClass)?
16How does "vertical cluster autoscaling" via Cluster Autoscaler differ from Pod-level autoscaling (HPA/VPA), and what triggers node scale-up/scale-down?
17What is the role of "ValidatingAdmissionPolicy" (a newer Kubernetes feature) compared to validating admission webhooks?
18How does the "garbage collection" of Kubernetes objects work with respect to "ownerReferences"?
19What is the difference between "kube-proxy" running in "iptables" mode versus "IPVS" mode for implementing Services?
20What is the purpose of "Vertical Pod Autoscaler's" "Recreate" update mode, and what is its main drawback?