πŸ“šBook Signing at KubeCon EU 2026Meet us at Booking.com HQ (Mon 18:30-21:00) & vCluster booth #521 (Tue 24 Mar, 12:30-1:30pm) β€” free book giveaway!RSVP Booking.com Event
Storage intermediate ⏱ 15 minutes K8s 1.28+

Kubernetes Storage Best Practices for Production

Production storage best practices for Kubernetes. Covers StorageClass selection, backup strategies, volume expansion, data migration, and storage performance tuning.

By Luca Berton β€’ β€’ πŸ“– 5 min read

πŸ’‘ Quick Answer: Production storage best practices for Kubernetes. Covers StorageClass selection, backup strategies, volume expansion, data migration, and storage performance tuning.

The Problem

Engineers frequently search for this topic but find scattered, incomplete guides. This recipe provides a comprehensive, production-ready reference.

The Solution

StorageClass Recommendations

# Production: encrypted, high IOPS
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: fast-encrypted
provisioner: ebs.csi.aws.com
parameters:
  type: gp3
  iops: "5000"
  throughput: "250"
  encrypted: "true"
  kmsKeyId: "arn:aws:kms:..."
reclaimPolicy: Retain        # Don't auto-delete data!
allowVolumeExpansion: true
volumeBindingMode: WaitForFirstConsumer
---
# Development: cheap, no encryption
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: dev-storage
provisioner: ebs.csi.aws.com
parameters:
  type: gp3
reclaimPolicy: Delete
allowVolumeExpansion: true

Checklist

PracticeWhyPriority
reclaimPolicy: Retain for prodPrevent accidental data lossCritical
allowVolumeExpansion: trueResize without recreating PVCHigh
WaitForFirstConsumerEnsure PV is in same AZ as podHigh
Encryption at restCompliance and securityCritical
Regular snapshotsPoint-in-time recoveryCritical
Monitor PV usageAlert before disk fullHigh
Test restore proceduresBackups are useless if untestedCritical

Volume Expansion

# Expand a PVC (no downtime for most CSI drivers)
kubectl patch pvc postgres-data -p '{"spec":{"resources":{"requests":{"storage":"100Gi"}}}}'

# Some drivers need pod restart for filesystem resize
kubectl delete pod <pod-using-pvc>
# Pod recreates and filesystem expands on mount
graph TD
    A[Storage Strategy] --> B[Dev: gp3, Delete, cheap]
    A --> C[Staging: gp3, Retain, encrypted]
    A --> D[Prod: gp3 high-IOPS, Retain, encrypted, snapshots]
    D --> E[Daily snapshots]
    D --> F[Cross-region replication]

Frequently Asked Questions

What happens if my PV’s AZ doesn’t match my pod’s node?

The pod stays Pending because the volume can’t be attached. Use WaitForFirstConsumer binding mode to create the PV in the same AZ as the pod’s node.

Best Practices

  • Start with the simplest approach that solves your problem
  • Test thoroughly in staging before production
  • Monitor and iterate based on real metrics
  • Document decisions for your team

Key Takeaways

  • This is essential Kubernetes operational knowledge
  • Production-readiness requires proper configuration and monitoring
  • Use kubectl describe and logs for troubleshooting
  • Automate where possible to reduce human error
#storage #best-practices #production #performance #backup
Luca Berton
Written by Luca Berton

Principal Solutions Architect specializing in Kubernetes, AI/GPU infrastructure, and cloud-native platforms. Author of Kubernetes Recipes and creator of CopyPasteLearn courses.

Kubernetes Recipes book cover

Want More Kubernetes Recipes?

This recipe is from Kubernetes Recipes, our 750-page practical guide with hundreds of production-ready patterns.

Luca Berton Ansible Pilot Ansible by Example Open Empower K8s Recipes Terraform Pilot CopyPasteLearn ProteinLens