This presentation discusses the use of local persistent volumes in Kubernetes and the challenges associated with managing them at scale.
- Local PersistentVolumes can be tricky to operate at scale
- Various options for using local volumes are explored
- Important operational gotchas are discussed to ensure proper use of local volumes and stateful workloads
- Persistent volumes have a direct one-to-one relationship with pods in stateful sets
- There is a trade-off between using network-attached volumes and local volumes based on performance and cost
When using local volumes, it is important to pay attention to operational gotchas such as storage-aware scheduling problems, host failures, upgrades, and why Pods may stay stuck in a Pending state. For example, if a pod is deleted, the relationship with its volume stays intact, allowing the stateful set controller to recreate the missing pod and automatically associate it with the same persistent volume. However, if not properly managed, these gotchas can lead to data loss and other issues.