DevOps / Editorial solution guide

Deployment fails: distinguish crashes, readiness, and rollback safety

Classify Kubernetes rollout symptoms before changing probes, restarting workloads, or assuming that a previous artifact can safely return.

About 4 min readContent reviewed

Read-only knowledge base ยท No public comments

Recognize the symptoms

A release is accepted but desired replicas never become available. Containers may repeatedly restart with CrashLoopBackOff, remain pending, fail image retrieval, or run while readiness stays false. These are distinct paths. A green pipeline step may mean only that an API accepted the request, while users still have no usable endpoint.

Understand the likely causes

  • Common causes include invalid startup configuration, missing files, wrong identity, incompatible architecture, resource pressure, an incorrect probe, or unavailable dependencies. CrashLoopBackOff is restart backoff after failure, not a diagnosis. Readiness failure alone should not be confused with the reason a process exited or a Pod could not be scheduled.

Fix the observation context

Identify the cluster context, namespace, workload owner, intended image identity, configuration revision, and rollout time from approved records before inspecting anything. Use only authorized read access and redact sensitive logs. Separate controller progress, Pod scheduling and image events, container termination, and probe results. The first synthetic record shows a configuration exit before any readiness decision can matter. Preserve the first failure and previous termination evidence before replacing instances, since repeated restarts can obscure the useful message. No cluster or container is accessed by these examples.

yaml Synthetic startup evidence
workload: lab-bookings
image_id: lab-build-42
container_state: terminated
exit_code: 1
safe_log_message: Missing API_ENDPOINT
restart_display: CrashLoopBackOff
first_action: verify-required-setting-reference

The named missing field points toward configuration. Increasing readiness delay cannot fix a process that exits before serving probes. No secret value or real cluster output is shown.

Follow the failing branch

For pending work, inspect scheduling constraints and resource or storage availability. For image failures, inspect the exact image reference, architecture, and authorized registry access without printing credentials. For a crash, inspect exit information and safe startup logs; for a running but unready process, compare the probe with the documented application endpoint and dependency policy. Do not remove probes or raise all limits simply to change the displayed status. Each repair should address an observed violated contract, and a shared dependency outage should not trigger a fleet-wide liveness restart loop.

Choose a compatible recovery action

Pause expansion according to the release policy while impact is assessed. Compare the previous artifact with current schema, messages, configuration, and credential versions before considering rollback. The second review record blocks a return that cannot read the current data representation. If compatibility is unknown, preserve evidence and use the accountable recovery decision process rather than issuing a blind undo. A configuration correction or forward repair may be safer. Platform rollback can change workload intent but cannot reverse already accepted writes or remote side effects.

yaml Synthetic rollback decision record
candidate_recovery: lab-build-41
current_schema: expanded-v3
previous_reader_compatibility: not-verified
credential_version: current-approved-reference
decision: block-blind-rollback
next_step: accountable-compatibility-review

Unknown compatibility blocks an automatic return. The record does not assert that expanded-v3 is incompatible; it records that the evidence needed to authorize recovery is missing.

Repair through the reviewed path

Change the smallest justified input in the approved source of truth and preserve the artifact and configuration association. If a GitOps reconciler owns the workload, an unmanaged manual edit can be reversed; use the documented scoped emergency exception when required. Separate startup allowance, traffic readiness, and restart liveness. Confirm timing from measured behavior rather than copying universal thresholds. Record the repair owner and decision, and keep the previous evidence available so post-incident review can explain why the chosen action reduced risk instead of merely suppressing a symptom.

Verify the fix

Verify the intended artifact and configuration are running, the controller converges, relevant instances become ready, and bounded user-path checks pass. Observe errors, latency, resource pressure, queues, and integrity for a suitable window. Confirm a deliberately failing readiness condition removes admission without an inappropriate restart. Keep residual reconciliation or security tasks open after availability returns.

Keep it from recurring

  • Test startup, health semantics, termination, mixed-version state, and required settings before promotion. Preserve release identity and first-failure evidence. Rehearse a compatible recovery in an authorized isolated environment; a documented rollback command alone is not a recovery capability.

Official references