Interview Q&A / Docker & Kubernetes

INTERVIEW Q&A · 67 QUESTIONS

Docker & Kubernetes interview questions

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

  1. How do you run optional services or multiple replicas of a service in Docker Compose?

    Assign a service to a profile so it starts only when requested with --profile. For replicas use docker compose up --scale web=3, which requires the service not to publish a fixed host port.

    AdvancedQuick answer1 min read