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
6
votes
1 answer

How to configure a manually provisioned Azure Managed Disk to use as a Kubernetes persistent volume?

I'm trying to run the Jenkins Helm chart. As part of this setup, I'd like to pass in a persistent volume that I provisioned ahead of time (or perhaps exported from another cluster during a migration). I'm trying to get my persistent volume (PV)…
anschoewe
  • 1,089
  • 1
  • 14
  • 34
6
votes
0 answers

Minikube & Kubernetes: Using Windows Mounted Drive as Persistent Volume within Postgres Container

NOTE: After further troubleshooting I believe this is an issue with minikube mount. Much of the below description may not pertain to the exact issue. See my comments for additional info. Keeping the question as-asked. I'm attempting to use a local…
6
votes
2 answers

how to bound a Persistent volume claim with a gcePersistentDisk?

I would like to bound PersistentVolumeClaim with a gcePersistentDisk PersistentVolume. Below the steps I did for getting that: 1. Creation of the gcePersistentDisk: gcloud compute disks create --size=2GB --zone=us-east1-b gce-nfs-disk 2. Definition…
5
votes
2 answers

Persist heap dump in case of OOM in kubernetes pod?

I need to persist the heap dump when the java process gets OOM and the pod is restarted. I have following added in the jvm args -XX:+ExitOnOutOfMemoryError -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/dumps ...and emptydir is mounted on…
5
votes
3 answers

Why should I use Kubernetes Persistent Volumes instead of Volumes

To use storage inside Kubernetes PODs I can use volumes and persistent volumes. While the volumes like emptyDir are ephemeral, I could use hostPath and many other cloud based volume plugins which would provide a persistent solution in volumes…
Aditya Bhuyan
  • 328
  • 6
  • 10
5
votes
2 answers

Getting: bad option; for several filesystems (e.g. nfs, cifs) when trying to mount azure file share in K8 container

I created a Azure file share and I am able to connect to it using map network drive in my laptop having windows 10. I created a hello-world spring boot application with volume mount configurations for azure file share and trying to deploy in…
Saurabh
  • 2,384
  • 6
  • 37
  • 52
5
votes
1 answer

Create Persistent volume using command line (without using any file)

I want to create PV using the kubectl command line, Is it possible in Kubernetes or not. If it is possible then how?
5
votes
1 answer

Difference between NFS-PV, hostPath-PV on NFS and hostPath mount in deployment

I have a Kubernetes cluster setup (on-premise), that has an NFS share (my-nfs.internal.tld) mounted to /exports/backup on each node to create backups there. Now I'm setting up my logging stack and I wanted to make the data persistent. So I figured I…
Max N.
  • 993
  • 1
  • 12
  • 31
5
votes
1 answer

How to use Same EFS for mounting multiple directories in Kubernetes deployment

I am trying to find a solution to make use of the same Amazon EFS for mounting multiple directories in the Kubernetes deployment. Here is my use case I have an application named app1 that needs to persist a directory named "/opt/templates" to EFS I…
5
votes
1 answer

Where is Kubernetes storage location of a Persistent Volume?

I'm learning Kubernetes and trying to follow the following tutorial to create a Mysql…
5
votes
2 answers

access kubernetes storage from multiple pods with different modes - one pod ReadWrite, other pods ReadOnly

I have a pod that needs to save data persistently to a place outside the pod. I think a persistentVolume is a good idea for that. The pod called writerPod needs ReadWrite-access to that volume. Multiple other Pods (I'm calling them readingPods) need…
5
votes
1 answer

Kubernetes changing permissions of mounted volumes

I manage a deployment of Kubernetes on Openstack. My user pods mount a PersistentVolume created dynamically using Openstack Cinder as their home folder. What is strange is that if I create an (empty) file with file permissions 600: bash-4.2$ ls…
Andrea Zonca
  • 8,378
  • 9
  • 42
  • 70
5
votes
2 answers

How to mount the folder as volume that docker image build creates?

The docker-compose file is as follows: version: "3" services: backend: build: context: . dockerfile: dockerfile_backend image: backend:dev1.0.0 entrypoint: ["sh", "-c"] command: python manage.py runserver ports: …
5
votes
1 answer

How to copy home directory file into new persistent volume with Kubernetes?

I've got a JupyterHub Kubernetes deployment. When I create and attach a persistent volume (PV) it wipes out the home directory that is part of my image. It replaces it with an empty home directory where anything is written will be persisted as…
yvanscher
  • 1,009
  • 1
  • 13
  • 16
5
votes
1 answer

Kubernetes: Can I mount different subPaths from the same PV onto different locations of the same container?

Can I mount different subPaths from the same PV onto different locations of the same container? I run several wordpress instances on my company's Kubernetes cluster. Each instance has its own persistency volume and a container. The only peculiarity…
leonixyz
  • 1,130
  • 15
  • 28