Bind two stuck claims and keep a volume after its claim

  • 12 min
  • 7 steps
  • Config, storage and state

Steps

0 of 7 done

Read why two PersistentVolumeClaims in media are Pending, give each what it waits for, then switch a volume to Retain and watch it outlive its claim.

  1. Step 1 of 7

    The uploads claim in media has been Pending since the namespace was created, and nothing looks broken. Find the event that says what it is waiting for.

    Checked against what your commands print.

  2. Step 2, not started: Give uploads what it is waiting for, without editing the claim or the StorageClass. The uploader Deployment already mounts it.

  3. Step 3, not started: Find the node the scheduler chose for the uploads volume, as recorded on the claim itself.

  4. Step 4, not started: reports-data is also Pending, for a different reason. Find the reason and fix it with the manifest provided in this terminal, so the claim binds.

  5. Step 5, not started: The data in uploads must survive even if someone deletes the claim. Change the reclaim policy of the volume bound to uploads so that deleting the claim keeps the volume, then list the volumes to confirm.

  6. Step 6, not started: Retire the uploader: remove the uploader Deployment and the uploads claim, and wait until the claim is gone.

  7. Step 7, not started: Show that the volume outlived its claim, and read the phase it is in and which claim it still remembers.

Lab terminal

Cluster time 1 minute
kind cluster kx, Kubernetes 1.37.
Each step is checked as you work.
​
Tab completes. Up and Down recall.
Type help for more.
Terminal keys

Enter runs the command. Tab completes, and the arrow keys recall earlier commands. Control C stops a watch. On an empty line, or after Escape, Tab moves focus out of the terminal.