Home / Companies / New Relic / Blog / Post Details
Content Deep Dive

Kubernetes Fundamentals, Part 5: Working with Kubernetes Volumes

Blog post from New Relic

Post Details
Company
Date Published
Author
-
Word Count
1,902
Language
English
Hacker News Points
-
Summary

Kubernetes faces challenges with container storage due to the temporary nature of file systems in containers, which lose changes upon shutdown. To address this, Kubernetes provides two key storage solutions: volumes and persistent volumes. Volumes allow shared storage within a Pod, accessible by all its containers, but are tied to the Pod's lifecycle, resetting upon restart. Persistent volumes, however, exist at the cluster level, independent of individual Pods, allowing data persistence across Pod restarts and sharing among multiple Pods. Volumes require specification of "volumeMounts" for access within containers, while persistent volumes are provisioned either statically or dynamically and require a PersistentVolumeClaim to allocate storage. These storage solutions enable data sharing and persistence within Kubernetes environments, catering to different application needs and providing flexibility in managing storage resources.