Questions tagged [persistent-volumes]

This tag is for Kubernetes persistent volume related questions.

Kubernetes Persistent Volumes is a subsystem for managing storage. The PV subsystem is responsible for how the storage is provided whereas the PersistentVolumeClaim is the abstraction that is related to how the storage is consumed by the application.

771 questions
143
votes
11 answers

What is the difference between persistent volume (PV) and persistent volume claim (PVC) in simple terms?

What is the difference between persistent volume (PV) and persistent volume claim (PVC) in Kubernetes/ Openshift by referring to documentation? What is the difference between both in simple terms?
128
votes
18 answers

Kubernetes Pod Warning: 1 node(s) had volume node affinity conflict

I try to set up Kubernetes cluster. I have Persistent Volume, Persistent Volume Claim and Storage class all set-up and running but when I wan to create pod from deployment, pod is created but it hangs in Pending state. After describe I get only this…
Krzysztof
  • 1,281
  • 2
  • 7
  • 5
112
votes
12 answers

Kubernetes: Can't delete PersistentVolumeClaim (pvc)

I created the following persistent volume by calling kubectl create -f nameOfTheFileContainingTheFollowingContent.yaml apiVersion: v1 kind: PersistentVolume metadata: name: pv-monitoring-static-content spec: capacity: storage: 100Mi …
72
votes
4 answers

How to delete persistent volumes in Kubernetes

I am trying to delete persistent volumes on a Kubernetes cluster. I ran the following command: kubectl delete pv pvc-08e65270-b7ce-11e9-ba0b-0a1e280502e2 pvc-08e87826-b7ce-11e9-ba0b-0a1e280502e2 pvc-08ea5f97-b7ce-11e9-ba0b-0a1e280502e2…
Justin
  • 42,716
  • 77
  • 201
  • 296
70
votes
12 answers

Kubernetes Persistent Volume Claim Indefinitely in Pending State

I created a PersistentVolume sourced from a Google Compute Engine persistent disk that I already formatted and provision with data. Kubernetes says the PersistentVolume is available. kind: PersistentVolume apiVersion: v1 metadata: name:…
50
votes
1 answer

Kubernetes - how to download a PersistentVolume's content

I have a test executor Pod in K8s cluster created through helm, which asks for a dynamically created PersistentVolume where it stores the test results. Now I would like to get the contents of this volume. It seems quite natural thing to do. I would…
Ondra Žižka
  • 43,948
  • 41
  • 217
  • 277
47
votes
5 answers

Kubernetes NFS Persistent Volumes - multiple claims on same volume? Claim stuck in pending?

Use case: I have a NFS directory available and I want to use it to persist data for multiple deployments & pods. I have created a PersistentVolume: apiVersion: v1 kind: PersistentVolume metadata: name: nfs-pv spec: capacity: storage: 10Gi …
John
  • 10,837
  • 17
  • 78
  • 141
44
votes
3 answers

Kubernetes Persistent Volume Access Modes: ReadWriteOnce vs ReadOnlyMany vs ReadWriteMany

As per this official document, Kubernetes Persistent Volumes support three types of access modes. ReadOnlyMany ReadWriteOnce ReadWriteMany The given definitions of them in the document is very high-level. It would be great if someone can explain…
ACloudRoamer
  • 1,043
  • 2
  • 11
  • 19
44
votes
4 answers

How to mount a postgresql volume using Aws EBS in Kubernete

I've created the persistent volume (EBS 10G) and corresponding persistent volume claim first. But when I try to deploy the postgresql pods as below (yaml file) : test-postgresql.yaml Receive the errors from pod: initdb: directory…
X.J
  • 473
  • 1
  • 5
  • 9
36
votes
3 answers

kubernetes persistent volume accessmode

It seems that Kubernetes supports 3 kinds of access mode for persistent volume: ReadWriteOnce, ReadOnlyMany, ReadWriteMany. I'm really curious about the scheduler strategy for a pod which uses the ReadWriteOnce mode volume. For example, I created an…
wangzhe
  • 573
  • 1
  • 5
  • 13
31
votes
3 answers

Kubernetes: Is it possible to mount volumes to a container running as a CronJob?

I'm attempting to create a Kubernetes CronJob to run an application every minute. A prerequisite is that I need to get my application code onto the container that runs within the CronJob. I figure that the best way to do so is to use a persistent…
27
votes
3 answers

Kubernetes PVC with ReadWriteMany on AWS

I want to setup a PVC on AWS, where I need ReadWriteMany as access mode. Unfortunately, EBS only supports ReadWriteOnce. How could I solve this? I have seen that there is a beta provider for AWS EFS which supports ReadWriteMany, but as said, this…
Golo Roden
  • 140,679
  • 96
  • 298
  • 425
26
votes
9 answers

WaitForFirstConsumer PersistentVolumeClaim waiting for first consumer to be created before binding

I setup a new k8s in a single node, which is tainted. But the PersistentVolume can not be created successfully, when I am trying to create a simple PostgreSQL. There is some detail information below. The StorageClass is copied from the official…
Yan QiDong
  • 3,696
  • 1
  • 24
  • 25
25
votes
5 answers

Kubernetes NFS persistent volumes permission denied

I have an application running over a POD in Kubernetes. I would like to store some output file logs on a persistent storage volume. In order to do that, I created a volume over the NFS and bound it to the POD through the related volume claim. When I…
fragae
  • 285
  • 1
  • 3
  • 9
24
votes
2 answers

Volume claim on GKE / Multi-Attach error for volume Volume is already exclusively attached

The problem seems to have been solved a long time ago, as the answer and the comments does not provide real solutions, I would like to get some help from experienced users The error is the following (when describing the pod, which keeps on the…
1
2 3
51 52