Grading Checklist¶
- Identifies finalizers on the PV as the reason it is stuck in Terminating.
- Explains the Kubernetes finalizer mechanism: objects with finalizers cannot be deleted until finalizers are removed.
- Uses
kubectl get pv <name> -o yamlto inspect the finalizers list. - Identifies the specific finalizer (e.g.,
kubernetes.io/pv-protectionor a CSI external-provisioner finalizer). - Checks if a VolumeAttachment still exists for this PV.
- Verifies no pods or PVCs are still referencing the PV before removing finalizers.
- Demonstrates removing the finalizer with
kubectl patch. - Warns about the risk of removing finalizers: the underlying storage may not be cleaned up.
- Mentions checking the CSI driver pod logs for errors that prevent the finalizer from being cleared.
- Notes the difference between
Retain,Delete, andRecyclereclaim policies. - Suggests cleaning up the underlying cloud storage resource manually if using
Retainpolicy. - Recommends investigating why the CSI controller did not process the finalizer automatically.