☸️

Kubernetes MCQ

Test your Kubernetes knowledge with 100 multiple choice questions covering fundamentals to advanced concepts, with instant feedback and explanations.

100 Questions 40 Beginner 40 Intermediate 20 Advanced
1

What is Kubernetes?

2

What is the smallest deployable unit in Kubernetes?

3

What is a Kubernetes Node?

4

What is the role of the Kubernetes "control plane"?

5

What command-line tool is commonly used to interact with a Kubernetes cluster?

6

What does the command "kubectl get pods" do?

7

What is a Kubernetes "Deployment" primarily used for?

8

What is a Kubernetes "Service"?

9

What does "kubectl apply -f deployment.yaml" do?

10

What is a "Namespace" in Kubernetes used for?

11

What is the purpose of a "ReplicaSet"?

12

What does "kubectl describe pod <pod-name>" provide?

13

What is a "ConfigMap" used for in Kubernetes?

14

What is a "Secret" in Kubernetes?

15

What does the term "kubectl logs <pod-name>" do?

16

What is the purpose of a "Label" in Kubernetes?

17

What does "kubectl scale deployment <name> --replicas=5" do?

18

What is "etcd" in the context of Kubernetes?

19

What is the purpose of the "kube-scheduler"?

20

What does "kubectl create namespace dev" do?

21

What is a "container image" in the context of running workloads in Kubernetes?

22

What does "kubectl delete pod <pod-name>" do if the pod is managed by a Deployment?

23

What is the difference between a "Pod" and a "container"?

24

What does "kubectl get nodes" display?

25

What is the role of "kubelet" running on each node?

26

What is a "YAML manifest" in Kubernetes?

27

What does the "kind" field in a Kubernetes manifest specify?

28

What is the purpose of "kubectl port-forward"?

29

What is a "Job" in Kubernetes used for?

30

What is a "CronJob" in Kubernetes?

31

What does the term "desired state" mean in Kubernetes?

32

What is the purpose of "kubectl exec -it <pod> -- /bin/bash"?

33

What is "Minikube" used for?

34

What does the "restartPolicy" field in a Pod spec control?

35

What is the difference between "kubectl create" and "kubectl apply"?

36

What does a "selector" do in a Kubernetes Service definition?

37

What is the purpose of "kubectl rollout status deployment/<name>"?

38

What does it mean for Kubernetes to be "cloud-agnostic"?

39

What is the purpose of a "readiness probe"?

40

What does the abbreviation "K8s" stand for?

1

What is the difference between a "liveness probe" and a "readiness probe"?

2

What is the purpose of a "PersistentVolume" (PV) and "PersistentVolumeClaim" (PVC)?

3

What is a "StatefulSet" and how does it differ from a "Deployment"?

4

What is the purpose of a Kubernetes "Ingress" resource?

5

What are the main types of Kubernetes Services, and what does "ClusterIP" provide?

6

What is the purpose of "resource requests" and "resource limits" in a Pod spec?

7

What is a "DaemonSet" used for?

8

What does the "kubectl rollout undo deployment/<name>" command do?

9

What is the purpose of "node affinity" and "node selectors"?

10

What is the difference between "Horizontal Pod Autoscaler" (HPA) and "Vertical Pod Autoscaler" (VPA)?

11

What is the purpose of "Taints" and "Tolerations" in Kubernetes scheduling?

12

What is the purpose of "kubectl get events"?

13

What is "Helm" and what problem does it solve?

14

What does the "kubectl rollout restart deployment/<name>" command accomplish?

15

What is the purpose of an "init container" in a Pod?

16

What is a "sidecar container" pattern?

17

What does "kubectl top pods" require to function, and what does it display?

18

What is the purpose of "Role-Based Access Control" (RBAC) in Kubernetes?

19

What is the difference between a "Role" and a "ClusterRole" in RBAC?

20

What does the "imagePullPolicy: Always" setting do?

21

What is a "Headless Service" in Kubernetes?

22

What is the purpose of "kubectl cordon" and "kubectl drain" on a node?

23

What is the purpose of a "PodDisruptionBudget" (PDB)?

24

How does Kubernetes handle a Pod's restart when it crashes, in terms of "CrashLoopBackOff"?

25

What does "kubectl get all -n <namespace>" show, and what is a limitation of using "all" here?

26

What is the purpose of "context" in kubectl configuration (kubeconfig)?

27

What is the difference between "emptyDir" and "hostPath" volume types?

28

What is the purpose of "kubectl apply --dry-run=client -o yaml"?

29

What is a "Network Policy" used for in Kubernetes?

30

What is the purpose of "annotations" versus "labels" on Kubernetes objects?

31

What does the "terminationGracePeriodSeconds" field in a Pod spec control?

32

What is "kustomize" used for in Kubernetes configuration management?

33

What is the purpose of "QoS classes" (Guaranteed, Burstable, BestEffort) for Pods?

34

What does "kubectl edit deployment <name>" do?

35

What is the purpose of "ServiceAccounts" in Kubernetes?

36

What is the difference between "RollingUpdate" and "Recreate" deployment strategies?

37

What is the purpose of the "kubectl explain <resource>" command?

38

What is the effect of setting "replicas: 0" on a Deployment?

39

What happens when a Pod's container exceeds its memory "limit"?

40

What is the purpose of "kubectl wait" in scripts and automation?

1

How does the Kubernetes "reconciliation loop" (control loop) pattern work, as implemented by controllers?

2

What is a "Custom Resource Definition" (CRD), and how does it relate to the "Operator pattern"?

3

How does "admission control" fit into the Kubernetes API request lifecycle, and what is the difference between "ValidatingAdmissionWebhook" and "MutatingAdmissionWebhook"?

4

What is the role of "etcd" consistency guarantees (via the Raft consensus algorithm) in ensuring Kubernetes cluster reliability?

5

What is the difference between "horizontal scaling via HPA based on custom metrics" versus "based on CPU/memory metrics"?

6

How does Kubernetes's "Container Network Interface" (CNI) plugin architecture enable different networking implementations (e.g. Calico, Cilium, Flannel)?

7

What is the significance of "Pod Security Standards" (or the deprecated PodSecurityPolicy) regarding container privilege levels?

8

Why might "ETCD" be deployed as a separate cluster from the Kubernetes control plane nodes in large production environments, and what is the trade-off?

9

What is the purpose of "finalizers" on Kubernetes objects, and how do they affect deletion?

10

How does "Pod-to-Pod" networking typically work across different nodes in a cluster at a conceptual level (the "Kubernetes networking model")?

11

What is "etcd compaction" and why is it necessary?

12

What does "topology spread constraints" allow you to configure for Pod scheduling, and how does it differ from anti-affinity?

13

What is the purpose of "server-side apply" in Kubernetes, and what problem does it solve compared to "client-side apply"?

14

How do "leader election" mechanisms work for Kubernetes controllers (such as kube-controller-manager or custom Operators) running with multiple replicas for high availability?

15

What is the significance of "Pod overhead" in the context of running workloads with different container runtimes (e.g. gVisor or Kata Containers via RuntimeClass)?

16

How does "vertical cluster autoscaling" via Cluster Autoscaler differ from Pod-level autoscaling (HPA/VPA), and what triggers node scale-up/scale-down?

17

What is the role of "ValidatingAdmissionPolicy" (a newer Kubernetes feature) compared to validating admission webhooks?

18

How does the "garbage collection" of Kubernetes objects work with respect to "ownerReferences"?

19

What is the difference between "kube-proxy" running in "iptables" mode versus "IPVS" mode for implementing Services?

20

What is the purpose of "Vertical Pod Autoscaler's" "Recreate" update mode, and what is its main drawback?