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

StorageClass

Let PVCs trigger storage provisioning automatically.

StorageClass allows PVCs to provision storage automatically, removing the need to pre-create PVs.

Key fields

  • provisioner: storage plugin
  • parameters: storage options
  • reclaimPolicy: cleanup behavior

Minimal example

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: fast
provisioner: csi.example.com
parameters:
  type: ssd
reclaimPolicy: Delete

Tips

  • Two tiers (fast/standard) are usually enough
  • Review reclaim policy and backups in production

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