Sample questions
Question 1Easy
Which control-plane component stores the cluster's state?
- etcd
- kube-proxy
- Ingress
- kubelet
Answer: A. etcd
Explanation
etcd is a consistent key-value store holding all cluster objects; the API server reads and writes it.
Step-by-step solution
- etcd is a consistent key-value store.
- It holds all cluster objects and state.
- The API server reads and writes it.
Why the other options are wrong
- B. kube-proxy handles Service networking on nodes.
- C. Ingress routes HTTP traffic.
- D. The kubelet runs Pods on nodes.
Tip: etcd = the cluster's memory.
Question 2Easy
A batch task that must run to completion once, such as a data migration, should use a:
- DaemonSet
- Job
- Deployment
- Service
Answer: B. Job
Explanation
A Job runs Pods until a set number complete successfully; a CronJob schedules Jobs repeatedly.
Step-by-step solution
- The task must run to completion once.
- A Job runs Pods until they succeed.
- For repeated schedules, a CronJob creates Jobs.
Why the other options are wrong
- A. DaemonSets run continuously on every node.
- C. Deployments keep Pods running forever.
- D. Services route traffic; they do not run tasks.
Tip: Run once = Job; run on schedule = CronJob.
Question 3Easy
What does the Horizontal Pod Autoscaler (HPA) do?
- Creates new nodes in the data centre by hand
- Moves Pods between namespaces
- Adjusts replica count based on metrics
- Adds more CPU cores to an existing Pod
Answer: C. Adjusts replica count based on metrics
Explanation
HPA scales out or in by adjusting replicas to keep a target metric, such as average CPU utilisation.
Step-by-step solution
- HPA watches a metric like average CPU.
- It compares it with the target.
- It increases or decreases the number of Pod replicas.
Why the other options are wrong
- A. HPA does not create physical nodes.
- B. It does not move Pods between namespaces.
- D. Adding CPU to a Pod is vertical scaling.
Tip: Horizontal = more Pods; vertical = bigger Pods.
Question 4Easy
Which Service type exposes a set of Pods only inside the cluster?
- ExternalName
- NodePort
- ClusterIP
- LoadBalancer
Answer: C. ClusterIP
Explanation
ClusterIP is the default type and is reachable only from within the cluster.
Step-by-step solution
- ClusterIP is the default Service type.
- It gets an internal IP reachable only inside the cluster.
Why the other options are wrong
- A. ExternalName maps to an external DNS name.
- B. NodePort exposes the Service on each node's port.
- D. LoadBalancer exposes it externally.
Question 5Medium
An Ingress in Kubernetes is used to:
- Route external HTTP traffic by host and path
- Store persistent data for Pods
- Schedule batch jobs at fixed times
- Run one Pod per node
Answer: A. Route external HTTP traffic by host and path
Explanation
An Ingress (with an ingress controller) provides L7 routing, often with TLS termination, to multiple Services.
Step-by-step solution
- An Ingress defines HTTP routing rules by host and path.
- An ingress controller applies them.
- Example: /api to the API Service, /shop to the shop Service.
Why the other options are wrong
- B. Storage uses volumes.
- C. Scheduled jobs use CronJobs.
- D. One Pod per node is a DaemonSet.
Question 6Medium
In a Pod spec, what are resource requests used for?
- Setting the maximum disk size of the node
- Asking an admin to approve the Pod
- Requesting a new container image version
- Informing scheduling decisions
Answer: D. Informing scheduling decisions
Explanation
The scheduler places Pods on nodes with enough unreserved capacity for their requests; limits cap usage.
Step-by-step solution
- Requests state how much CPU and memory a container needs.
- The scheduler places the Pod only on a node with that much unreserved capacity.
- Limits, not requests, cap actual usage.
Why the other options are wrong
- A. Requests do not set node disk size.
- B. No admin approval is involved.
- C. Image versions are set in the image field.
Tip: Requests = scheduling; limits = enforcement.
Question 7Medium
Non-sensitive configuration such as feature flags or a log level should be stored in a:
- ConfigMap
- PersistentVolumeClaim
- Secret
- DaemonSet
Answer: A. ConfigMap
Explanation
ConfigMaps hold non-confidential key-value configuration injected as environment variables or files.
Step-by-step solution
- Feature flags and log levels are not sensitive.
- Non-confidential config goes in a ConfigMap.
- It is injected as environment variables or files.
Why the other options are wrong
- B. PVCs request storage.
- C. Secrets are for sensitive data like passwords.
- D. DaemonSets run Pods on every node.
Tip: Plain settings = ConfigMap; passwords = Secret.
Question 8Medium
Which Kubernetes object keeps a specified number of identical Pod replicas running and supports rolling updates?
- ConfigMap
- Secret
- Deployment
- PersistentVolume
Answer: C. Deployment
Explanation
A Deployment manages ReplicaSets, which maintain the replica count; changing the Pod template triggers a rolling update.
Step-by-step solution
- A Deployment declares the desired replica count and Pod template.
- It manages ReplicaSets to keep that many Pods running.
- Changing the template triggers a rolling update.
Why the other options are wrong
- A. ConfigMaps hold configuration.
- B. Secrets hold sensitive data.
- D. PersistentVolumes provide storage.
Tip: Stateless app = Deployment.
Question 9Hard
A Pod's container keeps crashing and restarting, and kubectl shows the status CrashLoopBackOff. What does this indicate?
- The Pod has completed successfully
- The image could not be downloaded from the registry
- It keeps crashing, with growing delays
- The Pod is waiting for a node with enough resources
Answer: C. It keeps crashing, with growing delays
Explanation
CrashLoopBackOff means repeated crashes with increasing back-off delay; an image download failure shows ImagePullBackOff instead.
Step-by-step solution
- The container starts and then crashes.
- Kubernetes restarts it.
- Each restart waits longer (back-off), giving CrashLoopBackOff.
Why the other options are wrong
- A. A successful Pod shows Completed.
- B. An image download failure shows ImagePullBackOff.
- D. Waiting for resources shows Pending.
Tip: CrashLoopBackOff? Run kubectl logs --previous.
Question 10Hard
Which statement about Kubernetes Secrets is accurate?
- They can only be read by the cluster administrator's laptop
- They are stored inside container images
- By default they are only base64-encoded, not encrypted
- They are always strongly encrypted with no extra setup
Answer: C. By default they are only base64-encoded, not encrypted
Explanation
Base64 is an encoding, not encryption; clusters should enable encryption at rest and restrict who can read Secrets.
Step-by-step solution
- Secrets are stored base64-encoded by default.
- Base64 is encoding, not encryption; anyone can decode it.
- Encryption at rest and access controls must be enabled separately.
Why the other options are wrong
- A. Access depends on RBAC, not a particular laptop.
- B. Secrets are separate objects, not in images.
- D. Strong encryption needs extra setup.
Tip: Base64 is not security.
Practise all 27 questions free
The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.
Open this topic in the app →