DELAPARRA
Index
Color
NL
Category: Kubernetes

Volume

Explained by Updated

What is Volume?

Volume: A directory accessible to containers in a Pod. Many types exist — configMap, secret, emptyDir, persistentVolumeClaim, hostPath. A volume in Kubernetes is a folder that containers in a pod can use. There are many kinds: emptyDir for temporary scratch space, configMap and secret for configuration and credentials as files, and persistentVolumeClaim for storage that outlives the pod.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Volume

How is Volume used in practice?

The pod spec lists the volumes, and each container mounts the ones it needs at a path of its choice.

What should you keep in mind with Volume?

Choose the type by lifetime. Data that may disappear with the pod goes in emptyDir; data that must survive goes on a persistent volume, or better, in an external service like a managed database or object storage. Avoid hostPath, which mounts a folder from the node itself, unless you really need it, because it ties pods to specific nodes and can expose the host's files.

What does an example of Volume look like?

spec: volumes: - name: cache emptyDir: {} containers: - name: app volumeMounts: - name: cache mountPath: /cache

At a glance

CategoryKubernetes
Explained by
Updated

More Kubernetes terms

All terms starting with V

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.