Questions tagged [persistent-volume-claims]

284 questions
11
votes
2 answers

How do I change the storage class of existing persistent volumes?

I have a bunch of standard PVs bound to PVCs in Kubernetes running in Google Kubernetes Engine. I want to change their storage class to SSD. How do I achieve that?
10
votes
1 answer

Shared directory for a kubernetes Deployment between it's replicas

I have a simple deployment with 2 replicas. I would like that each of the replicas have same storage folder in them (shared application upload folder) I've been playing with claims and volumes, but haven't got the edge still, so asking for a quick…
9
votes
1 answer

Kubernetes Permission denied for mounted nfs volume

The following is the k8s definition used: apiVersion: v1 kind: PersistentVolumeClaim metadata: name: nfs-pv-provisioning-demo labels: demo: nfs-pv-provisioning spec: accessModes: [ "ReadWriteOnce" ] resources: requests: …
lokanadham100
  • 1,149
  • 1
  • 11
  • 22
9
votes
1 answer

Add persistent volume in Kubernetes StatefulSet on Minikube

I'm new to Kubernetes and I'm trying to add a PVC in my StatefulSet on Minikube. PV and PVC are shown here: NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE neo4j-backups …
dimzak
  • 2,511
  • 8
  • 38
  • 51
8
votes
4 answers

Kubernetes - MountVolume.NewMounter initialization failed for volume "" : path does not exist

I am trying to setup a Local Persistent volume using local storage using WSL. But the pod STATUS stops at Pending. The kubectl describe pod gives below error. Warning FailedMount 21s (x7 over 53s) kubelet …
8
votes
3 answers

Is it possible to have the same PVC as two volumes in Kubernetes?

My pod declares two different volumes. I use some definition templating, and depending on the environment in some cases I would like to reuse the same claim for the two volumes. This results in an error: Unable to mount volumes for pod…
8
votes
1 answer

How to reuse an existing persistent volume claims

I have deleted my elasticsearch cluster, but now after I've deployed a new cluster I need to access the old data that was stored on 3 Persistent Volumes PV described bellow: NAME STATUS VOLUME …
PhiloJunkie
  • 1,111
  • 4
  • 13
  • 27
7
votes
1 answer

Persistent volume claim not claiming the volume

I have this persistent volume claim $ kubectl get pvc -ngitlab-managed-apps NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE prometheus-prometheus-server Pending …
7
votes
4 answers

Cannot deploy MySQL pod. --initialize specified but the data directory has files in it

I'm trying to setup a MySQL pod on Digital Ocean with Kubernetes. I kept getting this error: Initializing database 2019-03-05T14:32:58.707421Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use…
a.barbieri
  • 2,398
  • 3
  • 30
  • 58
6
votes
1 answer

Resizing PVC in Kubernetes With Kubectl edit

Recently I tried to resize PersistentVolumeClaim with help of Kubectl edit pvc to increase storage from 10 Gi to 70 Gi but it’s giving error: persistentvolumeclaims "myclaim" was not valid: * spec: Forbidden: spec is iimmutable after creation except…
Aftab
  • 71
  • 1
  • 1
  • 4
6
votes
2 answers

Kubernetes ReadWriteOnce Multi-Attach deadlock on deployment reload/restart

Consider the below PersistentVolumeClaim, as well as the Deployment using it. Being ReadWriteOnce, the PVC can only be mounted by one node at the time. As there shall only be one replica of my deployment, I figured this should be fine. However, upon…
6
votes
2 answers

Can we get Persistent Volume with only PVC (without PV) in k8s?

I just saw a yaml file for Postgres with PersistentVolumeClaim and volumeMounts and volumes with the persistentVolumeClaim in the postgres container. I couldn't find any PersistentVolume defined. However, when the postgres container pod has been…
injoy
  • 3,993
  • 10
  • 40
  • 69
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
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

Multiple pods using same database on kubernetes

I would like to know if it is possible for multiple pods in the same Kubernetes cluster to access a database which is configured using persistent volumes on a Google cloud persistent disk. Currently I am building a microservices achitecture web app…
1
2
3
18 19