Skip to main content
RunBook Academy

CephLXXXVIII · Kubernetes Storage Failure ScenariosKubernetes Storage Failure Scenarios

Kubernetes workloads during a Ceph cluster problem

Advanced⏱ ~18 minkubectlceph

What you'll learn

  • Map Ceph conditions to pod symptoms
  • Prioritise the response correctly
  • Protect workloads during a degraded period
  • Recover workloads afterwards

Prerequisites

None — start here.

Verified against Ceph Tentacle 20.2.x · Ceph Squid 19.2.x (supported previous) · cephadm matches the verified Ceph release · podman 4.x · csi-rbd and csi-cephfs current · RBD / CephFS / RGW current (matches Ceph release) · Linux kernel 5.15+ (5.10 minimum) · Ubuntu 24.04 LTS (Ceph host baseline) · Debian 12 (Bookworm) (Ceph host baseline) · Rocky Linux / RHEL / AlmaLinux 9.x (Ceph host baseline) · Proxmox VE 9.x (cross-course integration) · Kubernetes 1.31+ (cross-course integration) · 2026-08-18

Not yet marked complete on this device.

Why this matters in production

Different Ceph problems produce very different Kubernetes symptoms, and matching them correctly avoids treating a capacity problem as a driver problem.

The mapping

Ceph conditionPod symptom
OSD down, recovery runningelevated latency; no functional change
PG degradednone; I/O continues
PG below min_sizeI/O to affected volumes blocks
OSD fullwrites fail with ENOSPC
Pool quota reachedwrites fail with ENOSPC
Monitor quorum lostrunning pods degrade; new mounts fail
MDS unavailableCephFS metadata operations block
Cluster unreachableall volumes stall; pods hang
ceph -s
kubectl get pods --all-namespaces --field-selector status.phase!=Running

Running both alongside each other is what makes the correlation.

Prioritising the response

1. Is Ceph the cause? — check ceph -s before anything Kubernetes-side
2. What Ceph condition? — the mapping above
3. Fix the Ceph condition — Kubernetes recovers when it clears
4. Only then assess pods that need individual attention

Kubernetes-side actions during a Ceph problem rarely help and frequently compound it: deleting pods causes rescheduling that needs mounts that cannot happen, and scaling down loses the ability to observe.

Protecting workloads during a degraded period

# stop the scheduler making it worse
NAME=acme
CURRENT=current
kubectl scale deploy ${NAME} --replicas=${CURRENT}
Avoid during a Ceph incident:
  deleting pods hoping they recover
  draining nodes
  scaling deployments
  rolling out changes
  anything that requires a volume to be mounted
# a cluster-wide pause on new workload placement, if warranted
NODES=nodes
kubectl cordon ${NODES}

The reasoning is that every one of those actions creates a mount operation, which is the thing that cannot succeed.

Recovering afterwards

# once Ceph is healthy
ceph -s | grep HEALTH_OK

# pods that need attention
kubectl get pods --all-namespaces -o json | python3 -c '
import sys, json
for p in json.load(sys.stdin)["items"]:
    st = p.get("status", {})
    for c in st.get("containerStatuses", []):
        if not c.get("ready"):
            print(p["metadata"]["namespace"], p["metadata"]["name"],
                  c.get("state", {}))'
Pod stateAction
Running and healthynothing
Running with I/O errors loggedrestart, and check the application’s recovery
Stuck ContainerCreatingshould resolve; delete if it does not
CrashLoopBackOffinvestigate the application’s response to the errors
Filesystem read-onlyrestart the pod

Quiz

Knowledge check · 4 questions

  1. Q1. Why does deleting stalled pods during a Ceph incident slow recovery?

  2. Q2. A pool can sit degraded for hours while every pod using it reads and writes normally.

  3. Q3. Respond to a Ceph incident affecting Kubernetes workloads.

    Ceph reports OSD_FULL. Many pods are logging I/O errors and some have entered CrashLoopBackOff. The team is deleting pods to try to recover them.

  4. Q4. Which Kubernetes actions should be avoided during a Ceph incident, and why?

Passing score: 75%. Answers are checked in this browser.

Production discipline

Check ceph -s before any Kubernetes-side action when pods report storage problems — the Ceph condition determines everything and Kubernetes actions during the incident all require mounts that cannot succeed. Leave stalled pods alone; they resume with no mount operations when storage returns.

Cross-course references

  • Kubernetes: backend outages should be fixed at the backend, not worked around at the workload layer
  • Linux: restarting a process stuck on unavailable storage rarely helps