Questions tagged [persistent-volume-claims]
284 questions
2
votes
1 answer
Statefulset not working in local minikube. It gives, Error from server (BadRequest): pod mysql-0 does not have a host assigned
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: mysql
namespace: cp1
spec:
selector:
matchLabels:
app: mysql
serviceName: mysql
replicas: 1
template:
metadata:
labels:
app: mysql
spec:
…

Jahadul Rakib
- 476
- 1
- 5
- 19
2
votes
1 answer
Kubernetes Persistent Volume: MountPath directory created but empty
I have 2 pods, one that is writing files to a persistent volume and the other one supposedly reads those files to make some calculations.
The first pod writes the files successfully and when I display the content of the persistent volume using…

camelia
- 41
- 4
2
votes
1 answer
Identify nodes of Persistent Volume Claims
All,
Is there a way to find the nodes associated with Persistent Volume Claim.
> kubectl get pvc -n namespace
gives me the list of Persistent Volume Claims. But I need the node also to which each of the Claim is associated with.
Even describing the…

Gopinath Rajee
- 400
- 5
- 20
2
votes
2 answers
Kubernetes volume duplication between worker nodes
I have a simple web app that uses volume/persistent volume claim to serve static data from there. Pods got scheduled only on the first worker node where volume resides.
How to deal with the shared volume between nodes in case I want to scale pods…

Most Wanted
- 6,254
- 5
- 53
- 70
2
votes
3 answers
Share static data in kubernetes cluster
We have a lot of static data that our apps would need for processing different requests. This data is available in many files of various sizes. We like to share these files across the kubernetes cluster.
One solution is to host these files on each…

Muzammil
- 417
- 1
- 4
- 20
2
votes
1 answer
What are AccessModes in Kubernetes Volumes
I am trying to understand the Access Modes of Kubernetes PersistentVolumes.
As per the Kubernetes docs, the access modes are:
ReadWriteOnce -- the volume can be mounted as read-write by a single node
ReadOnlyMany -- the volume can be mounted…

John Seen
- 701
- 4
- 15
- 31
2
votes
1 answer
How to mount an existing file-based DB for a StatefulSet to each kubernetes pod independently?
Right from start: very beginner in kubernetes here.
I (think to) know how I can create a volume for my StatefulSet for persistence. For that, I have
volumeMounts:
- name: db
mountPath: /var/lib/mydb
and
-…

transient_loop
- 5,984
- 15
- 58
- 117
2
votes
1 answer
Problem with mount path using the volumes on Kubernetes
I have a 3 node cluster (1 master and 2 worker nodes)
I have a deployment running with pod image as nginx on one of workers node. The following is its manifest definition:-
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
…

vinod827
- 1,123
- 1
- 21
- 45
2
votes
1 answer
How can I properly provision a volume for argo?
I have a persistent volume running in the correct namespace:
apiVersion: v1
kind: PersistentVolume
metadata:
name: raw-data
spec:
accessModes:
- ReadWriteOnce
capacity:
storage: 2Gi
hostPath:
path: /data
storageClassName:…

user3877654
- 1,045
- 1
- 16
- 40
2
votes
1 answer
Deployment can't be recreated during helm upgrade because PersistentVolumeClaim and Service failed to be replace
I have application that is using Helm charts to be deployed. On first helm upgrade --install command everything works as expected but second time I have this error:
Error: UPGRADE FAILED: failed to replace object: PersistentVolumeClaim "logs" is…

Most31
- 400
- 4
- 18
2
votes
3 answers
Do I have to explicitly create Persistent Volume when I am using Persistent Volume Claim?
I am new to Kubernetes, and I struggle to understand whol idea behind Persistent Storage in Kubernetes.
So is this enough or I have to create Persistent Volume and what will happen if I deploy only these two object without creating PV?
Storage…

Most31
- 400
- 4
- 18
2
votes
2 answers
How to create mysql service using local persistent volume to store the data on windows local machine
I want that mysql pod doesn't remove all mysql data when I restart the computer.
I should be able to store the data in my machine, so when I reboot my computer and the mysql pod starts again, the databases are still there.
here are my…

Tiago Machado
- 355
- 7
- 24
2
votes
2 answers
Can 3 replicas use the same PersistentVolume in a StatefulSet in Kubernetes?
I created a StatefulSet for running my NodeJS with 3 replicas and want to attach to a gce disk that can become a data storage for user to upload files.
My project naming: carx; Server name: car-server
However I got an error while creating the second…

potato
- 203
- 2
- 15
2
votes
1 answer
Kubernetes: 2 PVCs in 2 namespaces binding to the same PV, one successful, one failed
So I have 2 PVCs in 2 namespaces binding to 1 PV:
The following are the PVCs:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-git
namespace: mlo-dev
labels:
type: local
spec:
storageClassName: mlo-git
volumeMode:…

Ken Tsoi
- 1,195
- 1
- 17
- 37
2
votes
1 answer
how do scripts/files get mounted to kubernetes pods
I'd like to create a cronjob that runs a python script mounted as a pvc, but I don't understand how to put test.py into the container from my local file system
apiVersion: batch/v2alpha1
kind: CronJob
metadata:
name: update_db
spec:
schedule: "*/1 *…

jen
- 21
- 2