Containers & Orchestration
Packaging an application into an OCI image, running it as an isolated process under kernel namespaces and cgroups, and handing fleets of them to a scheduler that keeps declared state true. Every deployment answer bottoms out in an image and a scheduler.
on this pageshowhide
explore
- Docker (has its own guide)357 questions
- Dockerfile & Images47 questions
- Layers & Build Cache22 questions
- Container Lifecycle50 questions
- Container Networking28 questions
- Volumes & Storage20 questions
- Registries & Distribution37 questions
- Deploying Containers11 questions
- Hardening & Confinement45 questions
- Engine Operations39 questions
- Developer Experience16 questions
- Diagnostics & Triage15 questions
- Kernel Isolation & Runtimes27 questions
- Docker Compose16 questions
- Compose File Model1 questions
- Startup Ordering1 questions
- Networks & Volumes2 questions
- Environment & Interpolation5 questions
- Overrides & Profiles1 questions
- Compose CLI & Dev Loop5 questions
- Why Not Production1 questions
- LXCempty
- Podmanempty
- Kubernetes (has its own guide)448 questions
- Pods and Workloads49 questions
- API Object Conventions13 questions
- Services and Networking51 questions
- Config and Secrets24 questions
- Storage and Volumes29 questions
- Scaling and Scheduling59 questions
- Operators and CRDs31 questions
- Tenancy & Quotas18 questions
- Cluster Architecture43 questions
- Security41 questions
- Troubleshooting46 questions
- Cluster Lifecycle28 questions
- Adoption & Migration16 questions
- Helm (has its own guide)250 questions
- Chart Structure20 questions
- Templating & Values35 questions
- Releases & Upgrades46 questions
- Dependencies & Repositories30 questions
- Hooks & Tests19 questions
- Alternatives & Boundaries12 questions
- Operating & Triage24 questions
- Chart Trust & Secrets20 questions
- Delivery & Extensibility20 questions
- Authoring for Reuse24 questions
- Kustomizeempty
- Bases & Overlaysempty
- Docker Swarm6 questions
- Nomadempty
- OpenShiftempty
- Routes & Ingressempty
- Container & Orchestration Concepts266 questions
- Container Isolation Model31 questions
- Image Format & Distribution18 questions
- Image Build Model27 questions
- Lifecycle & Termination21 questions
- Container Storage & Data18 questions
- Workload Networking Model28 questions
- Orchestration Model38 questions
- Updates & Availability24 questions
- Configuration & Secret Delivery19 questions
- Container Security Posture22 questions
- Operations & Diagnostics20 questions
→ has its own guide
- AI Engineerrole
- Backend Developerrole
- Cyber Security Expertrole
- Data Engineerrole
- DevOps / SRE Engineerrole
- DevSecOps Engineerrole
- Dockerskill
- Forward Deployed Engineerrole
- Full Stack Developerrole
- GitLab CI/CDskill
- Helmskill
- Java Backend Developerrole
- Java SDETrole
- Kotlin Backend Developerrole
- Kubernetesskill
- Linuxskill
- MLOps Engineerrole
- Machine Learning Engineerrole
- Network Engineerrole
- PostgreSQL DBArole
- QA Engineerrole
- Server-Side Game Developerrole
- Software Architectrole
questions
1,343 · 6 sectionsWhy must a container on a managed platform bind the injected PORT on 0.0.0.0?
basics
~20 sThe platform chooses the port, passes it in as an environment variable, and then connects to the container's IP on that port. An app that hardcodes a different port, or listens only on 127.0.0.1, is unreachable from outside its own network namespace.
On a single Docker host, how do you replace a running container with a new image version?
basics
~20 sPull the new image while the old container still serves, then stop it, remove it and run a new container on the new tag. Pin an immutable tag, and keep the previous image for rollback.
What does `docker buildx build --push` do that `docker build` followed by `docker push` does not?
basics
~20 s--push is shorthand for --output type=registry: buildx streams the finished layers from the builder straight to the registry. On a docker-container builder the image never enters the local image store, so a separate docker push would find nothing to push.
Why do developers bind-mount source into a running Docker container instead of rebuilding the image on every edit?
basics
~20 sA bind mount maps a host directory onto a path inside the running container, so an edit on the host is visible to the process instantly. Source baked in with COPY changes only when you rebuild the image.
In a Dockerfile, what happens to `docker build` when a `RUN` test command exits non-zero?
basics
~20 sA non-zero exit from any RUN command aborts docker build immediately: no layer is committed for that step and no image is tagged. Running the test suite in a RUN step is what turns a failing test into a failing build.
With Docker Compose, what is the difference between `docker compose run` and `docker compose exec`, and when do you use each?
basics
~20 sdocker compose run starts a new one-off container from a service's definition; docker compose exec runs a command inside that service's already running container. Use run for migrations and scripts, exec to inspect a live service.
In Docker Compose, what is the difference between the project `.env` file and a service's `env_file` and `environment` attributes?
basics
~20 sThe project .env file only feeds ${VAR} substitution while Compose parses compose.yaml. A service's env_file and environment attributes set variables inside its container; nothing in .env reaches a container unless one of them passes it on.
What problem does Docker Compose solve, and what are the main top-level sections of a compose.yaml file?
basics
~20 sCompose runs a multi-container stack from one declarative YAML file instead of many long docker run commands. The main top-level keys are services (the containers), networks, and volumes. docker compose up creates everything; down removes it.
With Docker Compose, you edit the API's source and run `docker compose restart api`, but the old code still runs. Why, and what fixes it?
basics
~20 sThe code is baked into the image, and docker compose restart only restarts the existing container from that old image. Rebuild and recreate with docker compose up -d --build api; a plain up skips the build because a local image already exists.
In a compose.yaml, how do `${VAR:-default}`, `${VAR-default}` and `${VAR:?err}` differ, and when would you use each one?
basics
~20 s${VAR:-default} uses the default when VAR is unset or empty, ${VAR-default} only when it is unset, and ${VAR:?err} makes Compose stop with err when VAR is unset or empty. Use defaults for tunables and :? for values that must be supplied.
Before moving a ticket-booking checkout service onto Kubernetes, what must the application itself change to run well as a container?
basics
~20 sThe app must read configuration from environment variables or mounted files, log to stdout and stderr, expose a readiness signal that reflects real ability to serve, shut down cleanly on SIGTERM, and size itself from its container limits.
On a Kubernetes platform run by a platform team, what is a golden-path template, and why use it instead of hand-written manifests?
basics
~20 sA golden-path template is a platform-maintained, pre-approved way to deploy a service: developers fill in a few values and the template produces the Deployment, Service, probes and resources, so every team gets safe defaults without writing raw Kubernetes manifests.
In Kubernetes, what is the difference between a label and an annotation, and how do you decide which one to use?
basics
~20 sLabels are short identifying key/value pairs that selectors match, so Services, Deployments and kubectl -l find objects by them. Annotations carry non-identifying data of any shape, capped at 256 KiB in total, that tools read by key but nothing can select on.
In Kubernetes, how do `kubectl create -f`, `kubectl replace -f` and `kubectl apply -f` differ when you manage an object from a YAML file?
basics
~20 skubectl create only makes new objects and fails if the name exists. kubectl replace overwrites an existing object with the whole file. kubectl apply creates or updates by merging the file into the live object and leaves fields it never set alone.
In Kubernetes, what are labels, and how do equality-based and set-based label selectors decide which objects match?
basics
~20 sKubernetes labels are key/value pairs on an object's metadata. A label selector lists requirements, all of which must match: equality (=, !=) or set-based (in, notin, exists). Services, ReplicaSets and kubectl use selectors to find objects.
How do Helm and Kustomize differ in how they produce the final manifests applied to a cluster?
basics
~20 sHelm renders a chart's Go templates against values, so the final YAML is generated from files that are not YAML. Kustomize patches complete YAML instead. Helm also stores each apply as a release; kubectl apply -k stores nothing.
Why is helm upgrade described as a one-shot apply rather than a reconcile loop?
basics
~20 shelm upgrade runs once: it renders the chart, sends the result to the API server, records a new release revision and exits. Nothing then watches the cluster, so drift survives until somebody runs Helm again.
What does helm lint check in a chart, and what does it not catch?
basics
~20 shelm lint parses the chart metadata, renders the templates with the values it is given, and reports INFO, WARNING and ERROR findings. It never contacts a cluster, so a manifest that renders as valid YAML but is an invalid Kubernetes object still passes.
What makes a Helm chart's values.yaml defaults safe to install unedited?
basics
~20 sDefaults that render runnable YAML with no -f file: every key a template reads is present and typed, empty extension points declared as {} or [], nothing secret or site-specific baked in, and required inputs failing the render loudly.
In a Helm Chart.yaml, what is the difference between version and appVersion?
basics
~20 sversion is the chart package's own version and must be valid SemVer 2; Helm names the tarball, indexes and resolves the chart from it. appVersion is a free-form label naming the application release the chart ships, and Helm never parses it.
What does Docker Swarm mode add on top of a single Docker Engine, and how is a swarm service different from a container you start with `docker run`?
basics
~20 sSwarm mode turns several engines into one cluster of manager and worker nodes. A service is declared desired state — image, replica count, update policy — and managers keep that many tasks (containers) running, rescheduling them when containers or nodes fail.
Walk through what `docker service update --image myapp:2.0` does to a 10-replica swarm service, and which settings control the blast radius if the new image is broken.
basics
~20 sThe manager updates the service spec and replaces tasks in batches. update_config sets parallelism, delay, order (stop-first or start-first), monitor window, max failure ratio and failure_action (pause, continue, rollback). docker service rollback restores the previous spec.
How does deploying a Compose file with `docker stack deploy` differ from running the same file with `docker compose up`, and which Compose keys are ignored when deploying to a swarm?
basics
~20 sdocker compose up runs containers on one engine and can build images. docker stack deploy sends the file to swarm managers, which create services across the cluster; it honours the deploy: section and ignores single-host keys such as build, container_name, depends_on and links.
How many manager nodes should a Docker Swarm cluster run, what happens when a majority of managers becomes unreachable, and how do you recover from that?
basics
~20 sManagers replicate cluster state with Raft, so use an odd number — 3 or 5 — tolerating (N-1)/2 failures. Losing quorum freezes all cluster changes while existing tasks keep running. Recover by restoring managers, or run docker swarm init --force-new-cluster on a survivor.
In a Docker Swarm cluster, how does a client request reach a service replica when it hits a published port on a node that is running no replica of that service, and how do containers on different hosts reach each other?
basics
~20 sPublished ports use the ingress overlay network and routing mesh: every node listens on the port and load balances to a task anywhere via IPVS. Container-to-container traffic runs over VXLAN-encapsulated overlay networks, with service names resolving to a virtual IP.
The mounted configuration file changed minutes ago, yet the service still enforces the old rate limit — why?
basics
~20 sDelivery and consumption are separate events. The process parsed the file once at start-up and serves from that in-memory copy; nothing re-reads it unless the process was written to, so the old value stands until it re-reads or is replaced.
The same report-renderer image runs in an integration environment and in production — what may legitimately differ between the two?
basics
~20 sOnly the values supplied around the artifact may differ: endpoints, credentials, copy count, verbosity, feature switches. The image bytes stay identical, because identical bytes are what makes an earlier environment's test evidence mean anything in production.
If a payments ledger's datastore password is baked into the image it ships as, who can read it and what does changing it cost?
basics
~20 sEveryone who can obtain the artifact holds the credential, because the value travels with the image to every registry, mirror, host and environment it reaches. Changing it means building a new artifact and rolling it out, so rotation becomes a release.
How does a tuning value reach a process running inside a container, and what does the delivery shape decide?
basics
~20 sTwo shapes: a flat set of name-value pairs the process inherits when it is created, or a directory of files mounted into its filesystem. The choice decides who else can read the value and what changing it costs.
A service image moves from a full distribution base to a minimal base — what goes away with it?
basics
~20 sEverything the distribution shipped that the process does not carry itself: the shell and its utilities, the package manager, usually the trusted-certificate store, timezone and locale data, and most system libraries. Only the artifact and whatever the build copied in remain.