logo

What You Need to Know Before Using Local Persistent Volumes

2021-10-13

Authors:   Sebastien Guilloux


Summary

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.

Abstract

As Kubernetes matures, it becomes easier to run distributed databases and other stateful workloads on top of it. In order to do so, one important thing to figure out is how to manage persistent data. Local PersistentVolumes, as opposed to network-attached ones, can be particularly tricky to operate at scale. In this talk we will explore various options to make use of local volumes, along with a few important gotchas to be aware of. Come learn about static vs. dynamic provisioning, storage-aware scheduling problems, host failures, upgrades, and why your Pods may stay stuck in a Pending state.

Materials:

Post a comment

Related work