Container & Orchestration Concepts
An image built in layers, a process fenced off by the kernel, and a control loop keeping a declared set of them running. Asked first, because knowing one platform's syntax is not knowing the model.
on this pageshowhide
explore
- Container Isolation Model31 questions
- Container vs Virtual Machine5 questions
- Container Runtime Layers4 questions
- Kernel Fencing Primitives4 questions
- CPU & Memory Limits5 questions
- Overcommit & Noisy Neighbours5 questions
- Rootless & User Remapping4 questions
- Shared-Kernel Limits4 questions
- Image Format & Distribution18 questions
- Layers & Union Filesystem4 questions
- Content Addressing & Tags4 questions
- Manifests & Multi-Arch Indexes5 questions
- Registry Pull Semantics5 questions
- Image Build Model27 questions
- Base Image Choice5 questions
- Build Context Scope5 questions
- Layer Cache & Invalidation5 questions
- Build & Runtime Stages4 questions
- Build-Time Secrets4 questions
- Reproducible & Attested Builds4 questions
- Lifecycle & Termination21 questions
- States & Exit Codes4 questions
- Init Process & Reaping4 questions
- Graceful Shutdown & Drain5 questions
- Crash Loops & Backoff4 questions
- Health & Readiness Checks4 questions
- Container Storage & Data18 questions
- Ephemeral Writable Layer4 questions
- Mounts vs Managed Volumes4 questions
- Requested Durable Volumes5 questions
- Stateful Workloads5 questions
- Workload Networking Model28 questions
- Per-Container Network View4 questions
- Exposing a Port4 questions
- Service Names & Resolution4 questions
- External Traffic Entry5 questions
- Overlay Networks & Addressing6 questions
- Network Policy & Egress5 questions
- Orchestration Model38 questions
- Declarative Workload Specs4 questions
- Co-Located Container Groups5 questions
- Long-Running & Batch Workloads5 questions
- Control Loop & Reconciliation5 questions
- Scheduling & Placement Constraints5 questions
- Self-Healing & Rescheduling5 questions
- Control vs Data Plane5 questions
- Shared Clusters & Quotas4 questions
- Updates & Availability24 questions
- Rolling Replacement4 questions
- Revisions & Safe Rollback4 questions
- Replica Autoscaling6 questions
- Planned Drains & Disruption Caps5 questions
- Ordered & Stateful Rollouts5 questions
- Configuration & Secret Delivery19 questions
- Environment Variables & Files5 questions
- Config Change Propagation5 questions
- Credentials at Runtime4 questions
- Environment-Specific Values5 questions
- Container Security Posture22 questions
- Non-Root & Read-Only Root5 questions
- Syscall & Kernel Confinement4 questions
- Privilege Escape Surface5 questions
- Image Provenance Gating4 questions
- Workload Identity4 questions
- Operations & Diagnostics20 questions
- Logs as Streams4 questions
- Container Resource Metrics4 questions
- Minimal-Image Debugging4 questions
- Startup Failure Triage4 questions
- Resource Pressure & Eviction4 questions
- Backend Developerroleanchors this topic
- Cyber Security Expertroleanchors this topic
- Data Engineerroleanchors this topic
- DevOps / SRE Engineerroleanchors this topic
- DevSecOps Engineerroleanchors this topic
- Full Stack Developerroleanchors this topic
- Java Backend Developerroleanchors this topic
- Kotlin Backend Developerroleanchors this topic
- MLOps Engineerroleanchors this topic
- Server-Side Game Developerroleanchors this topic
- Software Architectroleanchors this topic
- Forward Deployed Engineerrole
- Kubernetesskill
- Linuxskill
questions
266 · 11 sectionsWhen a runtime starts a container, which separate views of the system does it fence off, and what stays shared?
basics
~20 sA container is several fences applied at once: its own root filesystem, process table, network stack, host identity and inter-process channels, plus an accounting group that caps what it consumes. The kernel underneath stays shared.
A container passes its CPU ceiling, and later its memory ceiling — what happens to the process each time?
basics
~20 sPassing the CPU ceiling only slows a process: it is throttled, waits for the next period's quota, and stays alive. Passing the memory ceiling ends it — there is no memory throttle, so the kernel kills a process inside the boundary.
A worker reports as root inside its container but cannot set the host clock - why is root inside not root on the host?
basics
~20 sRoot inside a container is an id read in that container's own view, and the runtime already trimmed its privilege set, so host-wide powers like setting the clock are missing. Many setups also map that id onto an unprivileged host id.
Why does a containerized service reading the machine's CPU and memory totals see the host's numbers rather than its own ceiling?
basics
~20 sThe fences hide other workloads; they do not rewrite the interfaces that report machine capacity. Those numbers come from the shared kernel's host-wide view, while the container's ceiling lives in an accounting group nobody told the process about.
Why can a deployment that names an image by tag start different bytes next week, when a digest reference cannot?
basics
~20 sA tag is a label a publisher attaches and can re-attach to different content at any time, while a digest is computed from the image's own bytes — change one byte and it is a different digest, so nothing can republish under the old one.
Why does the same image reach one host in seconds and take minutes on a host that never ran it?
basics
~20 sA pull moves only the layer blobs a host is missing. A host that already holds most of them reads a manifest and little else, while a host with an empty content store has to transfer every layer and expand it to disk.
An image is a stack of read-only layers merged into one view — what does a process see when two layers hold the same path?
basics
~20 sA union filesystem stacks the layers and serves one merged tree: for any path the highest layer that mentions it wins, so an upper layer's copy hides the identical path in every layer beneath it. The lower bytes remain in the image.
What happens between naming an image reference and having its layers on a host that never held them?
basics
~20 sThe reference is parsed and resolved at the registry to a manifest and its digest, the client proves it may read that repository, the manifest is read for the blobs it lists, and only the digests the host lacks are fetched, checked and expanded.
A large asset bundle is added in one layer and deleted in a later one — why doesn't the image shrink?
basics
~20 sLayers are append-only and immutable. The later layer records a deletion marker that hides the path, but the bundle's bytes stay in the earlier layer, so they are still stored, still transferred to every host that fetches the image, and still counted in its size.
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.
When a build is pointed at a directory, what is packaged and sent to the builder before the first instruction runs?
basics
~20 sEverything under the directory the build was pointed at, recursively, minus whatever the ignore rules exclude. That packaged set is the build context, and it is transferred before step one. An instruction can only read files that are inside it.
A build-time token is baked into an image layer — who can read it once the image is published?
basics
~20 sEveryone who can pull the image, and everyone already holding a copy of it. The value sits in a read-only layer and in the build record that travels with it, so pull access is credential access.
After editing one source file, why did the image rebuild re-execute every build step that came after it?
basics
~20 sEach build step's reuse depends on the layer it starts from. The edit changed the inputs of the step that copies that file, so the step ran again and wrote a new layer - and every later step then started somewhere new and missed.
Why is a nightly batch job's image over a gigabyte when the compiled artifact it runs is 40 MB?
basics
~20 sA single-stage build ships everything the build needed, not only what the run needs: the compiler toolchain, development headers, the whole source tree, intermediate output and package-manager caches all stay in the image's layers beside the 40 MB artifact.
A telemetry ingester is in a restart loop, but its logs come back nearly empty — where is the failing attempt's output?
basics
~20 sEach restart attempt is a new instance with a fresh output stream, so a request for the logs returns the attempt that just started, not the one that failed. Read the previous attempt's retained output instead.
When a running instance fails a liveness check, versus when it fails a readiness check, what does each failure cost?
basics
~20 sFailing a liveness check costs the instance its life: the platform ends the process and starts a fresh one, discarding everything in memory. Failing a readiness check costs it only traffic: it leaves the routing set, keeps running, and rejoins when it passes again.
When a nightly batch container stops, what does its exit code tell whatever supervises it?
basics
~20 sThe exit code is the container's own verdict on its run: zero means the work completed, any non-zero value means it did not. At stop time the supervisor branches on that one number, not on anything the job printed.
Which restart policy suits a long-running telemetry ingester, and which suits a run-to-completion import job?
basics
~10 sA long-running service wants restarting whenever it ends, because any ending is abnormal. A run-to-completion job wants restarting only when it ends badly, so that a successful run is not repeated forever.
When a replica is asked to stop, why does closing its listening socket first still drop requests, and what order avoids that?
basics
~20 sBecause removal from the routing set is not instant. For a few seconds after the stop request, callers are still being sent here, and a closed listener turns each one into a connection failure. Leave the routing set first, keep serving while that propagates, then refuse new work.
Your batch job's data directory is a host path mounted into the container — how does that differ from a platform-provisioned volume?
basics
~20 sA host path hands the container a directory that already exists on whichever machine it runs on. A platform-provisioned volume is storage the platform creates, tracks as its own object, and re-attaches wherever the workload lands.
Why does a file a container writes inside itself vanish when that instance is replaced by a new one?
basics
~20 sThe write landed in that instance's own thin writable layer, a private area created empty on top of the read-only image. Replacing the instance discards the layer, and nothing written only there is kept or recoverable.
A container process runs under a non-root numeric user id and gets permission denied writing to its mounted host directory — why?
basics
~20 sMounted storage keeps the ownership and mode bits it has outside the container, and the check compares numeric ids: if the process is neither the owner nor in the owning group, only the others bits apply — which rarely include write.
A workload declares a storage request of 200 gigabytes with one writer, so what does the platform do before the container starts?
basics
~20 sThe platform treats the declaration as a request: it looks for an existing backing store that satisfies the size and writer count, or creates one on demand, then binds the request to that one store. The workload starts only after binding.
Why must each copy of a data-owning workload keep a stable identity and its own storage across replacement?
basics
~20 sA data-owning copy holds data no other copy has, so the replacement is useful only if it comes back as that same copy. A durable per-copy name plus storage bound to that name, not to the instance, is what makes that possible.
Inside a container, a worker connects to localhost to reach a database in another container - why does that fail?
basics
~20 sEach container normally gets its own network view: its own interface, its own address and its own loopback. So localhost inside a container means that container itself, and nothing is listening there. Reach the other container by its address or its name.
Two containers on one host both listen on port 8080 internally, so why can only one publish host port 8080?
basics
~20 sA host port is an exclusive claim on a host address, so only one mapping can hold it there. Inside, each container has its own network view, so both processes can hold 8080 without ever meeting.
A container's process listens on port 8080 but nothing off the host reaches it — what does publishing a host port do?
basics
~20 sPublishing claims a port on the host and installs an address-translation rule, so traffic arriving at that host port is rewritten and delivered to the container's own address and port. The process inside binds nothing on the host and is unchanged.
A containerised report renderer must be reachable from partner browsers — which entry shapes can publish it, and what does each trade?
basics
~20 sFour entry shapes: internal-only, a port reserved on every host, a balancer provisioned for that one workload, or a shared edge routing many hostnames and paths. They trade cost per external address against routing power and blast radius.
A search indexer binds its status endpoint to the container's loopback address - why can nothing outside reach it?
basics
~20 sThe bind address decides which interfaces a listener will accept traffic on. Bound to loopback, it accepts only what arrives on that view's loopback; traffic from outside arrives on the container's other interface and is never delivered to it.
Why does a live workload's copy count, raised by hand during an incident, drop back to the declared number within a minute?
basics
~20 sA control loop runs continuously, reading the live state, comparing it with the declared spec and acting on the difference. A copy count raised by hand is exactly such a difference, so the next pass removes the extra copies.
In a container orchestration cluster, what does the control plane own and what does each host's node agent own?
basics
~20 sThe control plane decides: an API, the state store behind it, and the scheduler and controllers that act on declared state. Each host's node agent runs and supervises the containers assigned to that host, alongside the workloads themselves serving traffic.
At 3am one replica of a five-replica device-telemetry ingester exits and nobody is paged - what replaces it, and what does the replacement not inherit?
basics
~20 sThe platform's control loop sees four copies where the spec declares five and starts a fifth. The replacement is a new instance built from the same spec: new address, empty writable layer, cold caches. Nothing from the dead copy is recovered.
Your platform runs an always-on checkout service and a nightly report that must finish once — why are those different workload contracts?
basics
~20 sThey disagree about what a process exiting means. A replicated long-running service must never exit, so the platform recreates any copy that does. A run-to-completion job is supposed to exit once; a clean exit is the whole point and ends it.
What measurement does replica autoscaling watch, and what does it compare that measurement against to pick a copy count?
basics
~20 sReplica autoscaling watches a load signal - processor utilisation, queue backlog, requests in flight - and compares it against a configured target, adding copies while the signal sits above that target and removing them while it sits below.
Your order API runs six copies behind one shared name; why does replacing all six at once drop requests, while replacing them a batch at a time does not?
basics
~20 sStopping all six copies leaves the shared name with no copy able to serve until a replacement finishes starting, so every request in that window fails. Replacing a batch at a time keeps the rest serving throughout.
Why does a platform replace the copies of a data-owning, individually-named workload one at a time in a fixed order?
basics
~20 sBecause those copies are not interchangeable. Each owns a slice of durable data and a name the replacement must reclaim, and the group needs a majority alive, so only one may be missing at a time.
A queue-fed rendering worker autoscales on average processor use per copy, yet its backlog keeps growing - why?
basics
~20 sThe signal does not track the pain. A rendering worker that spends most of its time waiting on downloads and uploads shows modest processor use even while items pile up, so the measurement never crosses its target and the copy count never rises.
A platform keeps every applied rollout as a numbered revision - what does one revision contain, and what happens when you reapply an earlier one?
basics
~20 sA revision is a snapshot of the entire declared spec at one apply - image reference, copy count, reservations, ceilings and settings together. Reapplying an earlier revision runs a normal forward rollout whose target happens to be that older spec.
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 can re-read its configuration on a reload signal or by watching the mounted file — how does each fail?
basics
~20 sReload on a signal fails when nothing sends the signal to every instance, or the handler rebuilds only part of the state. Watching the file fails when the watcher misses a whole-directory swap, storms on repeated events, or dies silently and never updates again.
A workload spec asks to run a container in privileged mode — what does that switch off, and what still applies?
basics
~20 sPrivileged mode hands the container the host's full privilege set, reachable host devices and no confinement profile, so the process can reconfigure the machine. The per-resource views and the resource ceilings usually remain, which is why it still looks contained.
After its root filesystem is made read-only, a report renderer cannot write scratch files - what must be declared?
basics
~20 sA read-only root filesystem refuses every write except into paths declared writable, so the renderer needs one mounted at its scratch directory and its temporary-file setting pointed there. Declare the size and the owning id too, or it breaks again.
A workload runs as the image's default superuser account - what does that actually cost you?
basics
~20 sRunning as the superuser hands any code-execution bug full in-container privilege: it can rewrite the program files the running process reads, open every mounted credential regardless of ownership, and exploit whatever the boundary fails to close. An unprivileged, explicitly declared numeric id removes that head start.
Why does mounting the container runtime's control socket into a container hand that container administrative access to the host?
basics
~20 sAnything that can reach the runtime's control socket can ask it to create a privileged container with the host's filesystem mounted in, and the runtime obeys as a host-level process. No privilege inside the calling container is needed.
Where does an admission gate sit when a workload spec is submitted to a cluster, and what can it do to that request?
basics
~20 sAn admission gate runs after a workload spec is submitted and before the platform stores or schedules it. It reads the spec and the image reference the spec names, then admits the request or refuses it outright.
A container reports 92% memory use while its host shows most memory free — which reading decides its fate?
basics
~20 sThe container's own figure decides: usage is accounted inside its boundary and judged against the ceiling declared for it. The host's free memory is capacity this workload may never use, so 92% means it is near being killed.
A service writes its log to a file inside the container and the platform's captured log view is empty — why?
basics
~20 sA container platform's log contract is the process's standard output and error streams — the runtime captures those. A file written inside the container is outside that capture, so nothing collects it, and it is gone when the instance is replaced.
A workload never reached running and is serving nothing — which four distinct startup failures produce that symptom?
basics
~20 sFour separate failures look identical from outside: the image never arrived on the node, the start was refused before any code ran, the process started and died, or it runs and never reports ready. Naming which one is the first move.
A search indexer sizes its worker pool from the processor count it reads at start-up — why does it crawl under a small CPU ceiling?
basics
~20 sIt asked the system how many processors the machine has, and the host answered. The pool and its per-worker buffers are sized for hardware it never gets, so workers contend for one small run-time allowance.
A worker ships on an image with no shell and no package manager and fails in one environment only — what debugging moves are gone?
basics
~20 sEverything that needs a program inside the container: no interactive session, no install, no file viewing, no probing from within. What is left is a joined debug container, the instance's retained output, copying a file out, and a local rebuild with tools added.