|
| 1 | +# Kubernetes Storage |
| 2 | + |
| 3 | +Kubernetes doesn't provide storage - you need an external system. |
| 4 | + |
| 5 | +## Options |
| 6 | + |
| 7 | +### Local/HostPath |
| 8 | + |
| 9 | +- Data stored directly on node disk. |
| 10 | +- Fast but not portable, no redundancy. |
| 11 | +- Use only for caching, logs, ephemeral data. |
| 12 | + |
| 13 | +### Longhorn |
| 14 | + |
| 15 | +- Simple replicated storage across nodes. |
| 16 | +- Lightweight, but not very performant in prod. |
| 17 | +- Easy setup, good for homelabs and small clusters. |
| 18 | + |
| 19 | +### Cloud Volumes (AWS EBS, GCP PD, Azure Disk) |
| 20 | + |
| 21 | +- Fully managed by cloud provider. |
| 22 | +- Extremely reliable, zero ops overhead. |
| 23 | +- Trade-off: vendor lock-in and cost. |
| 24 | + |
| 25 | +### Ceph / Rook |
| 26 | + |
| 27 | +- Powerful distributed storage with full control. |
| 28 | +- Complex to operate - needs a lot of compute available. |
| 29 | +- Rock-solid, but only for large on-prem deployments with expertise. |
| 30 | + |
| 31 | +### NFS |
| 32 | + |
| 33 | +- Simple shared storage. |
| 34 | +- Easy setup, universal compatibility. |
| 35 | +- Performance depends on NFS server. |
| 36 | +- Fine for shared files, avoid for databases. |
| 37 | +- Probably also only good for a homelab mostly. |
| 38 | + |
| 39 | +## Quick Guide |
| 40 | + |
| 41 | +- **Homelab** --> Longhorn |
| 42 | +- **Production** --> Cloud volumes |
| 43 | +- **Large on-prem** --> Ceph (if you have the expertise) |
| 44 | +- **Testing/cache** --> Local volumes |
| 45 | +- **Shared files** --> NFS |
0 commit comments