Kubernetes Interview Questions on Workloads and Scheduling
Kubernetes interview answers should connect API objects, controllers, scheduling and useful application behaviour. Explain what each component controls and which evidence remains missing. A Bound volume claim does not prove that a Pod can use its storage on every node. The fictional topology case below pairs a zone-constrained volume with an incompatible Pod node selector.
Topic: Kubernetes in IT Infrastructure · Interview preparation
Quick answer: Kubernetes interview answers should connect API objects, controllers, scheduling and useful application behaviour. Explain what each component controls and which evidence remains missing. A Bound volume claim does not prove that a Pod can use its storage on every node. The fictional topology case below pairs a zone-constrained volume with an incompatible Pod node selector. It demonstrates how to reason from supplied requirements without creating a cluster, changing storage or treating every Pending Pod as a shortage of CPU.
Key takeaways
- A controller reconciles desired state through particular API resources.
- Pod phase, container state and readiness are different signals.
- Bound storage still has topology and access constraints.
- Autoscaling needs usable metrics and capacity.
- RBAC, Secrets and NetworkPolicy each have their own scope.
Table of Contents
- How should you explain Kubernetes architecture?
- Which Pod and controller answers commonly follow?
- How do networking, configuration and access objects differ?
- Which scheduling and scaling answers need conditions?
- What should you say about persistent storage?
- Why can a Pod remain Pending with a Bound claim?
- How do troubleshooting, security and extension answers finish?
- References
How should you explain Kubernetes architecture?
1. What is Kubernetes? It orchestrates containerised workloads through APIs and reconciliation. It does not automatically supply every application dependency or operational guarantee.
2. What is the control plane? The API server exposes the API, etcd stores cluster state, and controllers and schedulers perform their respective reconciliation and placement work.
3. What runs on a worker? A kubelet manages assigned Pods through a compatible container runtime; networking and other components implement the cluster’s chosen design.
4. Does Kubernetes require Docker Engine? No. It uses compatible Container Runtime Interface implementations. Docker-built compatible images and Docker Engine as a runtime are separate questions.
5. What is a namespace? A scope for many object names and administrative policies. It is not automatically a complete security or network-isolation boundary.
Which Pod and controller answers commonly follow?
6. Pod versus container? A Pod groups containers sharing selected execution context, including networking and applicable storage. The Kubernetes Pod lifecycle guide distinguishes Pod phase from individual container states.
7. Does Running prove readiness? No. Inspect readiness and application behaviour separately; a Pod can be running while unable to serve its intended workload.
8. Deployment versus ReplicaSet? A Deployment manages desired rollout behaviour through ReplicaSets; a ReplicaSet maintains a selected replica count.
9. StatefulSet versus Deployment? StatefulSets support stable identities and ordered behaviours for suitable workloads. They do not automatically configure correct database replication or protected backups.
10. DaemonSet versus Job? A DaemonSet places Pods on eligible nodes; a Job manages completion work. A CronJob schedules Jobs, with concurrency and missed-run behaviour needing review.
11. Does a rolling update guarantee zero downtime? The Kubernetes Deployment guide describes surge and unavailability controls. Capacity, readiness, connection handling and application compatibility still determine user impact.
How do networking, configuration and access objects differ?
12. Service versus Pod IP? A Service provides a stable abstraction for selected backends, while Pods can be replaced. Selectors and endpoint conditions affect the actual path.
13. ClusterIP, NodePort and LoadBalancer? They expose services through different mechanisms. External implementation, routing and provider behaviour must be considered for reachability.
14. Ingress versus Service? An Ingress describes supported HTTP routing rules interpreted by an implementation; a Service identifies backend access. An API object alone does not install a working controller.
15. ConfigMap versus Secret? They distinguish ordinary configuration from sensitive data intent. Base64 is not encryption, and the Kubernetes Secret guide recommends encryption at rest and restricted access.
16. What does RBAC decide? Permission for API actions on resources within the applicable scope. Application authorisation and container process permissions remain separate.
17. What does NetworkPolicy require? An implementation that enforces it. The Kubernetes NetworkPolicy guide explains selection and ingress/egress rules; merely creating a policy does not prove enforcement.
| Object or signal | Question it helps answer | Separate question |
|---|---|---|
| Deployment | Desired rollout and replicas | Can customers complete a transaction? |
| Secret | Sensitive configuration distribution | Who can retrieve it, and is storage encrypted? |
| NetworkPolicy | Selected traffic policy | Does the installed network implementation enforce it? |
| PVC Bound | Claim-to-volume association | Can a compatible node access the volume? |
Which scheduling and scaling answers need conditions?
18. Requests versus limits? Requests inform resource allocation and scheduling; limits constrain applicable usage through runtime mechanisms. Missing capacity and an application memory problem are different diagnoses.
19. nodeSelector versus affinity? Both can constrain placement; affinity expresses richer required or preferred relationships. Preferred rules do not provide the same guarantee as required rules.
20. Taints versus tolerations? Taints repel Pods lacking matching tolerations. A toleration permits consideration but does not independently guarantee placement.
21. HPA versus VPA? Horizontal scaling changes replica counts; vertical scaling concerns resource recommendations or changes through the relevant implementation. The Kubernetes horizontal-autoscaling guide describes HPA metrics APIs and limits; metrics availability and usable capacity matter.
22. Why can a Pod be Pending? Scheduling constraints, storage, resources or startup preparation may be involved. Read conditions and events in context instead of diagnosing from the phase alone.
What should you say about persistent storage?
23. PV versus PVC? A PersistentVolume represents storage available to the cluster; a PersistentVolumeClaim requests storage for a workload. Their binding is not a guarantee that every node can access it.
24. What does StorageClass describe? Provisioning and related storage policy. The Kubernetes StorageClass guide explains volume binding modes and driver-specific capabilities.
25. What does WaitForFirstConsumer change? It can delay binding or provisioning until workload scheduling constraints are known, for supported volume implementations. It does not automatically relocate data in an already Bound volume.
26. What do access modes mean? They describe supported mounting relationships, not application-level permissions or automatic write protection for every use.
27. Does deleting a Pod delete its persistent data? Data lifetime depends on the storage objects and policies, not simply the process lifetime. Reclaim policy and owner procedures require separate review.
Why can a Pod remain Pending with a Bound claim?
In an invented interview record, PVC reports Bound to a volume whose node affinity permits zone A only. The Pod’s required node selector permits zone B only. Supplied inventory contains nodes in both zones, but none satisfies both requirements.
The Kubernetes PersistentVolume guide states that volume node affinity constrains where a consuming Pod can be scheduled. Bound establishes an association; it does not cancel that constraint. Adding more zone-B CPU alone would not resolve this stated mismatch.
Ask the application and storage owners which placement is intended, what data must be retained and whether an approved compatible placement or data migration is appropriate. Do not recommend deleting the claim merely to clear Pending. For future supported provisioning, review binding mode and topology together.
| Invented supplied record | Meaning for this case |
|---|---|
| PVC is Bound | A volume association exists |
| PV requires zone A | Consuming placement must respect that storage constraint |
| Pod requires zone B | The workload excludes zone-A nodes |
| No node satisfies both | Review intended topology with owners before any change |
How do troubleshooting, security and extension answers finish?
28. Logs versus events? Container logs describe application output; events and conditions can describe scheduling or lifecycle observations. Their retention and completeness differ.
29. Liveness versus readiness? Liveness can trigger container restart after configured failures; readiness influences service eligibility. A broken dependency check can make a poorly designed liveness policy disruptive.
30. CRD versus controller? A custom resource definition adds API schema and storage for a resource type. A separate controller supplies the reconciliation behaviour expected by an Operator.
31. What belongs in an operational answer? Identify namespace, object identity, desired configuration, current conditions, relevant dependencies and the authorised owner. In the topology case, retain both conflicting requirements and the proposed decision for review; a general restart would not explain or resolve the conflict.
Related reading: Kubernetes interview foundations; OpenShift command and state interpretation.
References
Frequently Asked Questions
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Wow
0
Sad
0
Angry
0