CFN Cloud
Cloud Future New Life
en zh
2025-10-09 · 0 views

Persistent Volumes and PVCs

Decouple storage providers and storage consumers.

A PV is a cluster-level storage resource, while a PVC is a claim made by the application. Kubernetes binds a PVC to a suitable PV.

Core ideas

  • PV: provided by admins or storage systems
  • PVC: declares storage needs
  • Binding: one PVC to one PV

Common flow

  1. Create a PVC
  2. Bind to a PV (dynamic or manual)
  3. Mount PVC into Pods

Tips

  • Prefer StorageClass for dynamic provisioning
  • Mind access modes: ReadWriteOnce vs ReadWriteMany

Practical notes

  • Start with a quick inventory: kubectl get nodes, kubectl get pods -A, and kubectl get events -A.
  • Compare desired vs. observed state; kubectl describe usually explains drift or failed controllers.
  • Keep names, labels, and selectors consistent so Services and controllers can find Pods.

Quick checklist

  • The resource matches the intent you described in YAML.
  • Namespaces, RBAC, and images are correct for the target environment.
  • Health checks and logs are in place before promotion.

References