← CKA: Kubernetes administration and troubleshooting
10 / 13 · 45 MIN

Volumes and recovery by layer

Distinguish volume contracts, data access, and the first recovery stage.

Claim contract and actual capacity

A PVC expresses a need: class, size, volume mode, and access. The provisioner, driver, and storage must satisfy it. An omitted storageClassName can receive the default class; an empty string explicitly requests no class.

Distinguish Filesystem from Block: the latter supplies a device rather than an already formatted directory. The fragment requests 12 GiB in class fast for a consumer; it neither creates that class nor demonstrates driver support. Check provisioner, topology, and binding conditions before concluding that capacity alone is missing.

Lifecycle and data that must remain

RWO constrains read-write mounting to one node, not necessarily one Pod. Retain keeps the resource for administrative recovery after claim removal; Delete can also remove backing storage, depending on the driver. Neither policy is a backup strategy.

Before deleting or reusing a volume, identify ownership and evidence of data recovery. A larger PVC does not prove that the filesystem and application already recognize new capacity. Read PVC conditions and events and confirm class and driver expansion support.

Distinguish binding, attachment, and mount

A Bound claim identifies a PV relationship. It does not prove node attachment, completed mounting, or application data access. Investigate the first phase lacking evidence: scheduling and topology events; attachment and driver state; mount messages; identity and permissions seen by the process.

An attachment error on a new node after the previous node failed requires checking the old consumer’s state and exclusivity policy before forcing changes. For each intervention, record the exact resource and observe a representative read or operation without exposing real data as public material.

When the API is not the available observation point

If the API server is unavailable, kubectl logs may not be a useful observation path. On an authorized node, correlate kubelet service, runtime, and local containers. crictl needs the correct CRI endpoint; an empty list from the wrong socket does not prove containers are absent.

In kubeadm installations using static Pods for the control plane, also inspect local manifests and corresponding containers. Collect logs and timestamps before restarting components to preserve the failure sequence. If the API works but kubectl top fails, investigate the Metrics API chain; this does not establish that Pods stopped consuming resources.

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: reports
  namespace: analytics
spec:
  storageClassName: fast
  accessModes: [ReadWriteOnce]
  volumeMode: Filesystem
  resources:
    requests:
      storage: 12Gi
IN PRACTICE

After node failure, the PVC remains Bound and the replacement Pod is blocked at attachment. The team proposes deleting the claim. Preserve the relationship and data, inspect the previous consumer and driver message, and choose recovery respecting exclusivity. Declare recovery only after the application confirms expected data.

Common pitfalls

Deleting the claim for any failure; equating Bound with accessible data; confusing Block with a filesystem; inferring absent containers from the wrong endpoint.

Related topics: Kubernetes administration · Diagnosis and recovery

Take this idea with you

Recover the first failed phase and accept the result through the application and data.

Create account

References

Kubernetes® and CKA are trademarks or registered trademarks of The Linux Foundation. bigsavant.com is an independent preparation platform and is not affiliated with, associated with, sponsored, authorised or endorsed by The Linux Foundation. Content and questions are original, are not official exam questions, and completing our tests does not award or guarantee any certification. Names are used only to identify the subject. All other trademarks belong to their respective owners.