Interview Q&A / Docker & Kubernetes
Docker & Kubernetes interview questions
Images, containers, Dockerfiles, pods and deployments, from first principles.
Prefer rapid revision? Practise Docker & Kubernetes short interview answers →
- A Kubernetes Service is not routing traffic to your Pods. How do you debug it?
Check kubectl get endpoints for the Service. If it is empty, the Service selector does not match the Pod labels, or the Pods are not ready. Also verify targetPort matches the container port.
IntermediateQuick answer1 min read - What is the difference between port, targetPort and nodePort in a Service?
port is where the Service listens inside the cluster, targetPort is the container port traffic is forwarded to, and nodePort is the port opened on each node for NodePort or LoadBalancer Services.
IntermediateQuick answer1 min read