Cloud Native 16 min read

Master Docker & Kubernetes: 30+ Essential Quiz Questions to Test Your Skills

This article presents a comprehensive set of Docker and Kubernetes multiple‑choice questions, including single‑ and multiple‑answer formats, to help readers self‑evaluate their containerization knowledge and identify areas for further study in the field.

Ops Development Stories
Ops Development Stories
Ops Development Stories
Master Docker & Kubernetes: 30+ Essential Quiz Questions to Test Your Skills
To consolidate and self‑test basic containerization knowledge, the author collected multiple‑choice questions online. Scoring above 80% on Docker and Kubernetes indicates a solid grasp, after which one can continue studying the series of Kubernetes articles.

Docker Basic Quiz

Single Choice (15 questions, 4 points each)

1. What is Docker?

A. Virtual machine

B. Semi‑virtualization technology

C. Open‑source application container engine

2. What is the difference between Docker and KVM virtualization?

A. Docker containers start quickly, use few resources, OS‑level virtualization

B. KVM containers start quickly, use few resources, OS‑level virtualization

C. No difference

3. What role does Namespace play in Docker?

A. Resource isolation

B. Resource sharing

C. Resource limitation

4. What role does CGroup play in Docker?

A. Resource isolation

B. Resource sharing

C. Resource limitation

5. Which is NOT a component of Docker architecture?

A. runc

B. container

C. containerd

6. How to search for the Nginx image?

A. docker search nginx

B. docker nginx search

C. docker se nginx

7. How to download the Nginx image?

A. docker nginx pull

B. docker pull nginx

C. docker p nginx

8. Create an Nginx container and run it in the background?

A. docke run -d nginx

B. docker run -it nginx

C. docker run nginx

9. Create an Nginx container and expose host port 80?

A. docker run -d 80 nginx

B. docker run -d -p 80:80 nginx

C. docker run -port 80:80 nginx

10. Create an Nginx container and join the specified network lnmp_net?

A. docker run -net lnmp_net nginx

B. docker run -n nmp_net nginx

C. docker run --network lnmp_net nginx

11. How to enter the container terminal?

A. docker exec –d nginx

B. docker exec -it nginx /bin/bash

C. docker exec –itd nginx

12. How to view detailed container information?

A. docker ps

B. docker inspect

C. docker status

13. To access host data such as /proc from a container, which method should be used?

A. bind mounts

B. tmpfs

C. volumes

14. Which command builds an image from a Dockerfile?

A. docker build

B. docker commit

C. docker export

15. What is Docker Swarm?

A. Docker's official container clustering system

B. Single‑node container orchestration

C. Container engine

Multiple Choice (10 questions, 4 points each)

1. How can Docker help enterprises?

A. Increase resource utilization

B. Replace virtual machines

C. Standardization

D. Environment consistency

2. Which components are part of Docker architecture?

A. docker

B. dockerd

C. runc

D. containerd

3. What are Docker's core components?

A. LXC

B. CGroup

C. UnionFS

D. Namespace

4. How to view Docker version?

A. docker info

B. docker –help

C. docker -v

D. docker version

5. How many network modes does Docker have?

A. bridge

B. host

C. none

D. container

6. What does docker logs show?

A. Standard output

B. Standard error

C. Standard input

D. All of the above

7. How many ways can Docker mount host data into a container?

A. volumes

B. mount

C. tmpfs

D. bind mounts

8. Which are Dockerfile instructions?

A. FROM

B. EXEC

C. CMD

D. RUN

9. What storage drivers does Docker support?

A. AUFS

B. Device Mapper

C. OverlayFS

D. EXT4

10. What is Docker Compose?

A. Container engine

B. Centralized container management

C. Single‑node container orchestration

D. Container clustering system

Kubernetes Basic Quiz

Single Choice (15 questions, 3 points each)

1. Which components are essential for Kubernetes?

A. apiserver/controller-manager/scheduler/kube-proxy/service/etcd

B. kubeadm/controller-manager/kubelet/kube-proxy/scheduler/etcd

C. apiserver/controller-manager/kubelet/kube-proxy/scheduler/etcd

2. What is the main function of kubelet?

A. Network proxy

B. Resource scheduling

C. Container management

3. What is kubectl?

A. Cluster deployment tool

B. Command‑line tool for managing the cluster

C. Container creation tool

4. What is the difference between Deployment and StatefulSet?

A. Deployment deploys stateful apps, StatefulSet deploys stateless apps

B. Deployment deploys stateless apps, StatefulSet deploys stateful apps

C. No difference

5. What is the purpose of the pause container in a Pod?

A. Init container

B. Collect information from other containers

C. Manage Pod networking

6. How to limit maximum memory usage of a Pod?

A. resources.limits.cpu

B. resources.limits.memory

C. resources.requests.memory

7. How to scale Pod replicas up or down?

A. kubectl scale

B. kubectl rollout

C. kubectl apply

8. How does a Service associate with its Pods?

A. Deployment

B. Label

C. Endpoint

9. Which component is responsible for Service?

A. kubelet

B. kube‑proxy

C. apiserver

10. What does the emptyDir volume type do?

A. Mount host directory or file into container

B. Create an empty directory on the host and mount it into the container

C. Mount existing storage into container

11. Does an emptyDir volume get deleted when the Pod is deleted?

A. Yes

B. No

C. Auto backup

12. What is the purpose of a hostPath volume?

A. Mount host directory or file into container

B. Create an empty directory on the host and mount it into the container

C. Mount existing storage into container

13. What does RBAC do?

A. Role‑based access control

B. Attribute‑based access control

C. User‑based access control

14. What is a ServiceAccount for?

A. Store sensitive data

B. Store service configuration

C. Provide an identity for processes running in Pods to access the Kubernetes API

15. How does a Deployment perform a rolling update?

A. Two ReplicaSets gradually scale up/down until the new one reaches the desired replica count and the old one scales to zero

B. Deployment directly controls Pods, upgrading one Pod at a time until all are updated

C. A single ReplicaSet directly controls Pods, upgrading one Pod at a time

Multiple Choice (15 questions, 4 points each)

1. Which statements about Pods are correct?

A. Smallest deployment unit in K8s

B. A Pod is a single container

C. A Pod consists of one or more containers

D. Multiple containers in a Pod run on the same Node

2. Which resource objects are commonly used to deploy applications?

A. Deployment

B. StatefulSet

C. Service

D. DaemonSet

3. Which commands help troubleshoot a failing Pod?

A. kubectl describe pod

B. kubectl logs

C. kubectl get pod

D. kubectl exec –it xxx bash

4. What types of Service exist?

A. ClusterIP

B. NodePort

C. LoadBalancer

D. Ingress

5. What proxy modes does Service have?

A. Iptables

B. IPVS

C. Ingress

D. Userspace

6. Which stages are involved in Kubernetes security mechanisms?

A. RBAC

B. Authentication

C. Authorization

D. Admission

7. Which methods are supported for Pod health checks?

A. httpGet

B. probe

C. exec

D. tcpSocket

8. How to limit a Pod container to a maximum of 1 CPU (resources.limits.cpu)?

A. 1000m

B. 100m

C. 0.1

D. 1

9. Which attributes are used for static binding of PV and PVC?

A. Label

B. Access mode

C. Requested capacity

D. StorageClass

10. Why might a Node be NotReady?

A. kubelet not started

B. kubelet certificate error on startup

C. kubelet cannot connect to apiserver

D. kubelet has not reported latest status

11. What is the main function of kube‑proxy?

A. Automatically detect Pods and associate them with Services

B. Provide load balancing for Pods

C. Create containers

D. Report container status

12. What is the image pull policy in K8s?

A. Always

B. Never

C. IfNotPresent

D. Latest

13. What problem does the CNI network model (e.g., Flannel/Calico) solve?

A. Each Pod gets a unique IP

B. All Pods can communicate with any other Pod directly

C. Pods on the same Node can communicate directly

D. All nodes can communicate directly with all Pods

14. Which parts compose a deployment.yaml file?

A. Deployment controller attributes

B. Desired replica count

C. Pod template

D. Data volume

15. When deploying stateful applications in K8s, which concerns are primary?

A. Stable network ID

B. Scheduling onto the same Node

C. Stable data storage

D. Ordered start/stop/update

Follow the public account and reply with the keyword "答案" to receive the answers.

cloud-nativeDockerkubernetesDevOpscontainerizationQuiz
Ops Development Stories
Written by

Ops Development Stories

Maintained by a like‑minded team, covering both operations and development. Topics span Linux ops, DevOps toolchain, Kubernetes containerization, monitoring, log collection, network security, and Python or Go development. Team members: Qiao Ke, wanger, Dong Ge, Su Xin, Hua Zai, Zheng Ge, Teacher Xia.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.