Docker Kubernetes Technical Questions Interview Questions
10 curated questions with evaluation guidance for hiring managers.
Explain the difference between a Docker image and a container. How do you optimize image size?
Should explain image as a template, container as a running instance. Should mention multi-stage builds, alpine/minimal base images, .dockerignore, layer caching. Look for production image optimization experience.
What are the core components of Kubernetes? Explain the role of each.
Should discuss control plane (API server, etcd, scheduler, controller manager) and worker nodes (kubelet, kube-proxy, container runtime). Look for understanding of component interactions.
How do you manage configuration and secrets in Kubernetes? What are the security considerations?
Should discuss ConfigMaps for non-sensitive data, Secrets for sensitive data, encryption at rest, RBAC for access, and external secret managers (Vault, Sealed Secrets). Look for security awareness.
Explain Kubernetes networking. How does a pod communicate with another pod across nodes?
Should discuss CNI plugins, flat network model, Services (ClusterIP, NodePort, LoadBalancer), kube-proxy/iptables, and NetworkPolicies. Look for practical networking knowledge.
How do you implement rolling updates and rollbacks in Kubernetes? What deployment strategies are available?
Should discuss RollingUpdate, Recreate, blue-green, canary deployments using Deployments or service mesh. Should mention readiness probes and maxSurge/maxUnavailable. Look for zero-downtime deployment experience.
Describe how you would troubleshoot a Kubernetes pod that is in CrashLoopBackOff state.
Should mention kubectl describe pod, kubectl logs (including --previous), checking events, resource limits, health probes, and examining application startup behavior. Look for systematic debugging approach.
What are Persistent Volumes and Persistent Volume Claims? How do storage classes work?
Should explain PV as cluster resource, PVC as user request, dynamic provisioning via StorageClass, and access modes. Look for understanding of stateful application storage in K8s.
How do you secure a Kubernetes cluster? What are the key security measures?
Should discuss RBAC, Pod Security Standards, NetworkPolicies, image scanning, runtime security, API server security, and secrets management. Look for defense-in-depth security approach.
Explain the concept of a service mesh (like Istio). When would you introduce it?
Should discuss traffic management, observability, security (mTLS), and the operational overhead. Look for understanding that service mesh adds complexity and should solve real problems.
How do you design a Dockerfile for a Node.js/Python production application following best practices?
Should mention multi-stage builds, running as non-root user, using specific base image tags, layer caching optimization, health checks, and minimal attack surface. Look for production Dockerfile patterns.
Want AI-generated interview questions tailored to your specific job description? Workro analyses your JD and generates behavioural and technical questions calibrated for the role, seniority level, and required skills — in seconds.
Try free