teluzia.Cloud Engineer · Day 179
CHAPTER 26 · FEEDBACK AND GAP ANALYSIS

Docker/Kubernetes/CI/CD gap repair

4–5 hours including independent practice3 topics
LET’S MAKE THIS SIMPLE

What you’re learning today

Docker repair is today's starting point. An image declares port 8080, but the operator publishes host 8080 to container 80. Compare the application's actual listener with the mapping; EXPOSE documentation does not make the process listen. You will connect this with kubernetes repair and ci/cd repair. The lesson's artifact brings these decisions together: Diagnose three synthetic cases: wrong Docker port, mismatched Kubernetes selector and missing pipeline artifact; write the first discriminating check and validation.

Think of it this way

Container, cluster and pipeline faults are failures at different assembly stages; trace the handoff before changing the final stage.

TOPIC 01 / 03Step by step

Docker repair

Explain image layers, container processes, ports and volumes. Distinguish build-time files from mounted runtime data; deleting a container does not always delete persisted data. An image declares port 8080, but the operator publishes host 8080 to container 80. Compare the application's actual listener with the mapping; EXPOSE documentation does not make the process listen.

WORKED EXAMPLE
An image declares port 8080, but the operator publishes host 8080 to container 80. Compare the application's actual listener with the mapping; EXPOSE documentation does not make the process listen.

An image is a build artifact; a container is a running instance; a mount supplies runtime data outside or over image filesystem paths. Imagine a container starts with a volume mounted over a directory that held configuration in the image. The mounted content can hide the packaged files, producing a different runtime view than expected. Inspect the Dockerfile, entrypoint, mount and actual process listener separately. An image's documented exposed port does not publish it to the host. Removing a container may leave volumes and therefore persistent data, so cleanup requires ownership awareness. Container isolation simplifies packaging but does not remove host networking, filesystem and identity concerns. Repair one mistaken boundary with a small controlled example, then test a changed mount or port mapping without relying on the original screenshots.

Why this matters

Compare the application's actual listener with the mapping; EXPOSE documentation does not make the process listen.

A common trap

Build-time files and runtime mounts always behave identically.

Read all topics in this lesson

A complete reference to revisit alongside the guided steps above.

Docker repair

Explain image layers, container processes, ports and volumes. Distinguish build-time files from mounted runtime data; deleting a container does not always delete persisted data. An image declares port 8080, but the operator publishes host 8080 to container 80. Compare the application's actual listener with the mapping; EXPOSE documentation does not make the process listen.

WORKED EXAMPLE
An image declares port 8080, but the operator publishes host 8080 to container 80. Compare the application's actual listener with the mapping; EXPOSE documentation does not make the process listen.

An image is a build artifact; a container is a running instance; a mount supplies runtime data outside or over image filesystem paths. Imagine a container starts with a volume mounted over a directory that held configuration in the image. The mounted content can hide the packaged files, producing a different runtime view than expected. Inspect the Dockerfile, entrypoint, mount and actual process listener separately. An image's documented exposed port does not publish it to the host. Removing a container may leave volumes and therefore persistent data, so cleanup requires ownership awareness. Container isolation simplifies packaging but does not remove host networking, filesystem and identity concerns. Repair one mistaken boundary with a small controlled example, then test a changed mount or port mapping without relying on the original screenshots.

Why this matters

Compare the application's actual listener with the mapping; EXPOSE documentation does not make the process listen.

A common trap

Build-time files and runtime mounts always behave identically.

Kubernetes repair

Use pod events, previous logs, service selectors and probes to explain a failure. Running pods can still be unreachable when selectors or readiness differ; inspect the request path end to end. A service selects app=api while pods have app=web. Pods can be Running but receive no service traffic; compare labels and EndpointSlices before changing probes.

WORKED EXAMPLE
A service selects app=api while pods have app=web. Pods can be Running but receive no service traffic; compare labels and EndpointSlices before changing probes.

A pod label identifies workload metadata; a service selector chooses matching pods; an EndpointSlice records selected network endpoints. Imagine a rollout changes labels and the service stops selecting new pods. Healthy process logs do not prove service connectivity. Compare selector, pod labels, readiness and endpoint addresses, then trace the intended port. Namespace and context are part of the evidence because identical names can exist in different environments. Probe failures and network-policy failures can produce superficially similar user symptoms, so choose checks that separate selection from reachability. Kubernetes supplies useful abstractions but can hide the concrete request path from beginners. Rebuild that path on paper, diagnose the first mismatch and retest a different selector or readiness state before claiming the routing gap is repaired.

Why this matters

Pods can be Running but receive no service traffic; compare labels and EndpointSlices before changing probes.

A common trap

Running pods prove the service selector is correct.

CI/CD repair

Trace source, build dependencies, test results, artifact identity and deployment credentials. Fix the earliest cause and verify the release path; suppressing a test conceals evidence rather than repairing delivery. Tests succeed but packaging searches the wrong output path. Verify the built file's location and stage handoff; deployment credentials cannot repair an artifact that was never collected.

WORKED EXAMPLE
Tests succeed but packaging searches the wrong output path. Verify the built file's location and stage handoff; deployment credentials cannot repair an artifact that was never collected.

An input dependency is needed before a stage can run; an artifact handoff transfers output; a gate determines whether later work is permitted. Imagine tests produce a report in one directory while the workflow searches another and marks the job failed. Identify the producer's actual output and the consumer's path contract before disabling the test or retrying deployment. For a missing image, inspect whether build ran, publish succeeded and the deployment references the same digest. Runner differences and cache keys can alter behavior, so compare with the last good run. More automation can make failures repeat consistently, but only if evidence identifies the first cause. Repair that contract, rerun the relevant gates and verify the final runtime behavior rather than treating an uploaded file or a green final stage as sufficient proof.

Why this matters

Verify the built file's location and stage handoff; deployment credentials cannot repair an artifact that was never collected.

A common trap

Disabling a failed test repairs the delivery failure.

KEEP THESE WITH YOU

Today’s takeaways

Docker repair: Explain image layers, container processes, ports and volumes.

Kubernetes repair: Use pod events, previous logs, service selectors and probes to explain a failure.

CI/CD repair: Trace source, build dependencies, test results, artifact identity and deployment credentials.

CLOSE THE LOOP

Ready to complete this day?

Verify the practical steps and pass the knowledge check (at least two thirds correct).

Lab steps verifiedKnowledge check passed