← Back to Blog
Kubernetes Interview Questions & Answers for SRE (Junior)
Kubernetes12 questions·Nov 9, 2026

Kubernetes Interview Questions & Answers for SRE (Junior)

This guide collects 12 real-world Kubernetes interview questions with clear, interviewer-ready model answers, tailored for SRE candidates, at the Junior level. Use it to revise quickly, spot gaps, and rehearse strong answers before your next interview.

1. What is the difference between a Pod and a Deployment in Kubernetes, and when would you use each?

A Pod is the smallest deployable unit in Kubernetes and represents a single instance of a containerized application, while a Deployment is a higher-level construct that manages a set of identical Pods and handles replication, updates, and rollbacks. You use Pods directly only in rare cases like one-off jobs or debugging; in production, you almost always use Deployments because they provide self-healing (restarting failed Pods), scaling, and declarative updates. For example, a Deployment with three replicas ensures that if one Pod crashes, the Deployment controller will automatically create a new one to maintain the desired state.

2. You notice that a Pod in your cluster is stuck in the 'Pending' state and never transitions to 'Running'. Walk me through the troubleshooting steps you would take.

First, I would run kubectl describe pod <pod-name> to check the Events section for messages indicating why the Pod cannot be scheduled, such as insufficient resources or node affinity constraints. Next, I would check if there are enough available resources on the cluster nodes using kubectl top nodes and kubectl describe nodes to see resource requests versus available capacity. I would also verify that the container image specified in the Pod spec is correct and accessible, check if there are any PersistentVolumeClaims that cannot be bound, and ensure that any required storage classes or node selectors match available nodes. Finally, if the Pod has resource requests that exceed what any single node can provide, I would either adjust those requests or add more nodes to the cluster.

3. Explain what a Service is in Kubernetes and describe the difference between ClusterIP, NodePort, and LoadBalancer service types.

A Service in Kubernetes provides stable network access to a group of Pods by exposing them through a virtual IP or DNS name. ClusterIP is the default type and exposes the Service only within the cluster on an internal IP address, making it suitable for Pod-to-Pod communication. NodePort exposes the Service on a port on every node's IP address, allowing external traffic to reach the application by accessing any node on that port, which is useful for development but not production. LoadBalancer automatically provisions an external load balancer (on cloud platforms) that distributes traffic to the Service, providing a stable external IP that is suitable for production workloads requiring direct external access.

4. A developer asks why their application container is consuming 2GB of memory when they only requested 1GB. What could be happening, and how would you investigate?

The container's actual memory usage can exceed the requested amount because a request is not a limit; it is only used for scheduling decisions. I would first check if a memory limit was specified in the Pod spec, as the limit is the hard cap that triggers OOMKill if exceeded. If a limit is not set, the container can use as much memory as available on the node, which explains why it exceeds the request. I would investigate whether the application has a memory leak by checking logs with kubectl logs <pod-name>, examining the application's heap usage, and using tools like kubectl top pods to monitor memory over time. I would recommend setting both requests (for fair scheduling) and limits (to prevent resource starvation of other Pods), and working with the developer to profile the application and right-size these values.

5. What is a ConfigMap and a Secret in Kubernetes, and what are the security trade-offs when deciding what data to store in each?

Both ConfigMaps and Secrets are ways to inject configuration data and credentials into Pods without hardcoding them into container images. ConfigMaps are intended for non-sensitive configuration data like application settings and feature flags, while Secrets are designed for sensitive data like passwords, API keys, and tokens. ConfigMaps are stored as plain text in etcd, making them visible to anyone with cluster access, whereas Secrets are also stored in etcd but are meant to be more restricted via RBAC and are typically mounted as files or environment variables. However, Secrets are only base64-encoded by default (not encrypted), so for truly sensitive data, you should use external secret management systems or enable encryption at rest in etcd; additionally, Secrets should only be mounted as files or tmpfs volumes, never as environment variables, because environment variables are logged and more easily leaked.

6. Describe what happens when you apply a new container image to a Deployment using a rolling update strategy. What are the potential risks?

A rolling update gradually replaces old Pods with new ones running the updated container image by default, ensuring zero downtime by maintaining availability throughout the update. The Deployment controller scales down old Pod replicas and scales up new ones according to the maxSurge and maxUnavailable settings, which control how many Pods can be added and removed at each step. Potential risks include the new image containing bugs that cause the application to malfunction or crash, which affects user traffic during the update; if you do not use health checks (liveness and readiness probes), Pods with a broken image will be considered healthy and receive traffic. To mitigate these risks, you should always test the new image in a staging environment, use readiness probes to ensure traffic only goes to healthy Pods, set appropriate maxUnavailable values to limit exposure, and use canary or blue-green deployments for critical applications.

7. A customer reports that they cannot reach their application Pod from outside the cluster. The Pod is running, but external traffic is not being routed to it. What could be the issue?

The most likely issues are that no Service is exposing the Pod, or the Service type is not appropriate for external access. If they are using ClusterIP (the default Service type), traffic from outside the cluster cannot reach it because ClusterIP only exposes the Service internally. I would verify that a Service selector matches the Pod's labels using kubectl get svc and kubectl get pods --show-labels, and check the Service type is either NodePort or LoadBalancer for external access. I would also verify that network policies are not blocking ingress traffic and that any firewalls on the nodes allow traffic on the Service port. Finally, I would check if an Ingress resource is needed for HTTP routing or if DNS is properly configured to resolve to the Service or LoadBalancer IP.

8. What is a namespace in Kubernetes, and how would you use namespaces to organize resources in a multi-team cluster?

A namespace is a logical partitioning mechanism in Kubernetes that allows you to divide cluster resources into isolated groups, enabling multiple teams or projects to share the same cluster without interfering with each other. Each namespace has its own set of Pods, Services, Deployments, and other resources, and resource names only need to be unique within a namespace, allowing different teams to use the same names. You would create separate namespaces for different teams, environments (dev, staging, production), or applications, and use RBAC to restrict each team's access to only their namespace. You can also apply ResourceQuotas to each namespace to limit CPU, memory, and object counts, preventing one team from monopolizing cluster resources, and use NetworkPolicies to control traffic between namespaces.

9. Explain what a readiness probe and a liveness probe do, and provide an example of when each is important.

A readiness probe checks if a Pod is ready to receive traffic, and if it fails, the Pod is removed from the Service's load balancer endpoints but is not restarted; a liveness probe checks if a Pod is still alive, and if it fails repeatedly, the Pod is restarted by the kubelet. Readiness probes are crucial when starting an application that requires initialization time (like loading a database cache) so that traffic is not sent until the app is actually ready. Liveness probes are important for detecting deadlocks or hung processes that do not crash but stop responding, for example, if a web server becomes unresponsive due to resource exhaustion, a liveness probe that receives no response can trigger a restart. A practical example is a web application where the readiness probe does a quick health check on a specific endpoint to verify the server is listening, and the liveness probe periodically checks that the app can connect to its database and perform a simple query.

10. Your team is experiencing frequent Pod evictions due to memory pressure on nodes. Describe the steps you would take to resolve this issue.

First, I would identify which Pods are being evicted using kubectl describe node <node-name> to check the Kubelet Evicted Pods section and review cluster events with kubectl get events. Next, I would analyze the memory requests and limits of running Pods using kubectl top pods to see actual usage versus requested amounts, and identify applications with low or missing memory limits. I would work with developers to right-size memory requests and limits based on actual application consumption, and consider upgrading nodes with more memory or adding additional nodes to increase cluster capacity. I would also check for memory leaks in applications by monitoring memory usage over time and implement or tighten ResourceQuotas in namespaces to prevent excessive overcommitment. Additionally, I would review the kubelet eviction thresholds and policies to balance between resource protection and application availability.

11. What is a StatefulSet, and how does it differ from a Deployment? Give an example of a workload that requires a StatefulSet.

A StatefulSet is a Kubernetes workload designed for applications that require stable, unique network identities, persistent storage, and ordered deployment, whereas a Deployment is for stateless applications where Pods are interchangeable. StatefulSets assign each Pod an ordinal index (e.g., mysql-0, mysql-1, mysql-2) that persists even if the Pod is rescheduled, and they maintain a stable DNS hostname for each Pod, whereas Deployment Pods get random names that change on recreation. A typical use case for a StatefulSet is a database like MySQL or PostgreSQL where each replica has its own persistent storage, needs a stable identity for replication, and must be initialized in order; another example is a Kafka cluster where brokers need stable hostnames and persistent storage. Deployments are better for stateless web services like Node.js or Python web servers where Pods are identical and can be started in any order.

12. You are implementing monitoring for a Kubernetes cluster. What metrics would you collect for Pods, and how would you use them for operational insights?

Essential Pod metrics include CPU and memory usage, network I/O (bytes sent and received), and disk I/O to understand resource consumption and performance. You would use these metrics with tools like Prometheus and Grafana to create dashboards showing Pod health, identify resource bottlenecks, and trigger alerts when Pods exceed thresholds or become unhealthy. Memory and CPU trends help you right-size resource requests and limits, preventing evictions and ensuring fair scheduling; network metrics reveal communication patterns and potential application performance issues. You would also monitor Pod restart counts and failure rates to detect unstable applications or bugs, check container termination reasons to distinguish between OOMKill and other failures, and track Pod creation and termination rates to understand cluster dynamics. This data informs capacity planning, helps you debug performance issues, and validates that SLOs are being met.

Practice these in a real mock interview
Get scored live and see ideal answers with an AI interviewer.
Start a Mock Interview →
← Previous
Salesforce Triggers Interview Questions & Answers for Salesforce Developer (Senior)
Next →
Salesforce Interview Questions & Answers for Salesforce Developer (Mid-level)

Related interview questions

Kubernetes Pods Interview Questions & Answers
Kubernetes · 48 Qs
Kubernetes Pods Interview Questions & Answers
Kubernetes Pods Interview Questions & Answers (Senior)
Kubernetes · 36 Qs
Kubernetes Pods Interview Questions & Answers (Senior)
Kubernetes Interview Questions & Answers for DevOps Lead (Mid)
Kubernetes · 12 Qs
Kubernetes Interview Questions & Answers for DevOps Lead (Mid)
CICD Pipeline Design Interview Questions & Answers
CICD · 12 Qs
CICD Pipeline Design Interview Questions & Answers