Interview Q&A / Docker & Kubernetes

INTERVIEW Q&A · 67 QUESTIONS

Docker & Kubernetes interview questions

Images, containers, Dockerfiles, pods and deployments, from first principles.

  1. What is the difference between a Pod, a Deployment and a Service in Kubernetes?

    A Pod is the smallest unit Kubernetes runs, one or more containers sharing an IP address. A Deployment keeps a chosen number of identical Pods running and handles rolling updates. A Service gives those changing Pods one stable name and IP and load-balances traffic across them.

    IntermediateIn-depth4 min read
  2. What is the difference between CMD and ENTRYPOINT in a Dockerfile?

    ENTRYPOINT sets the program the container always runs, and CMD sets default arguments or a default command that is easy to override. Arguments passed to docker run replace CMD but are appended to ENTRYPOINT; changing ENTRYPOINT needs the --entrypoint flag.

    IntermediateIn-depth3 min read