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 pluginparameters: storage optionsreclaimPolicy: 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, andkubectl get events -A. - Compare desired vs. observed state;
kubectl describeusually 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.