Questions tagged [persistent-volume-claims]

284 questions
3
votes
1 answer

PersistentVolumeClaim Pending for NFS Volume

What specific changes need to be made to the yaml below in order to get the PersistentVolumeClaim to bind to the PersistentVolume? An EC2 instance in the same VPC subnet as the Kubernetes worker nodes has an ip of 10.0.0.112 and and has been…
CodeMed
  • 9,527
  • 70
  • 212
  • 364
3
votes
1 answer

How to enable storage size parameter in persistent volume claim?

Storage size which I specified in the persistent volume claim ignores with using nfs as a storage backend. I want to attach persistent volume to container with specified volume size. The following is the yaml file which I used to create pvc. kind:…
3
votes
1 answer

PersistentVolumeClaim is not bound: "nfs-pv-provisioning-demo"

I am setting up a kubernetes lab using one node only and learning to setup kubernetes nfs. I am following kubernetes nfs example step by step from the following link: https://github.com/kubernetes/examples/tree/master/staging/volumes/nfs Trying the…
Makin
  • 261
  • 2
  • 3
  • 4
3
votes
1 answer

Can a GCP persistent disk be be mounted/claimed by multiple pods in ReadWriteMany mode?

I've got a persistent disk (GCP), that I'm hoping to be able to allow read write access to multiple pods. Is this possible? Here are my two configs: pVolume.yaml apiVersion: "v1" kind: "PersistentVolume" metadata: name: "pv0001" spec: …
3
votes
1 answer

Kubernetes not claiming persistent volume - "failed due to PersistentVolumeClaim is not bound: "task-pv-claim", which is unexpected."

I'm not sure why the persistent volume is not being claimed, or what steps I could take to further diagnose this? Should the claim size match the volume size? Should the volume size match the GCP volume size? This is so difficult to test and figure…
2
votes
1 answer

failure-domain.beta.kubernetes.io/region label missing in my nodes makes deployment not find the PV in Azure AKS service

In a Azure AKS kubernetes cluster, after a cluster version upgrade the nodepool nodes, I have a PV that has this node affinity: Node Affinity: Required Terms: Term 0: failure-domain.beta.kubernetes.io/region in [westeurope] The nodes…
2
votes
1 answer

Periodic VolumeSnapshot in Kubernetes

I wrote a CronJob that periodically takes volume snapshot of my PVC. Below is the CronJob file: kind: CronJob metadata: name: mycronjob spec: schedule: "*/2 * * * *" # Run the job every 2 minutes jobTemplate: spec: template: …
2
votes
1 answer

Share multiple folders in pod using persistent volumes

I want to share multiple volumes using PersistentVolume reqource of kubernetes. I want to share "/opt/*" folders in pod. But not the "/opt": kind: PersistentVolume apiVersion: v1 metadata: name: demo namespace: demo-namespace labels: app:…
2
votes
1 answer

How to monitor disk usage of persistent volumes of all storageclasses using Prometheus?

I am using Kubernetes Persistent Volumes dashboard on Grafana to view the disk usage for my PVCs. This dashboard makes use of kubelet_volume_stats_used_bytes metric to fetch the data for the PVCs and I am able to visualize it as well. But, it does…
2
votes
1 answer

k8s Deployment set readOnly in volumes vs volumeMounts

I want to utilize data from a persistent volume as readOnly inside a container. What is the difference of setting the readOnly flag under the volumeMounts vs the deployment volumes.persistentVolumeClaim? The results seems to be the same. Is one of…
Gr3at
  • 330
  • 6
  • 12
2
votes
0 answers

Kubernetes Statefulset problem with Cluster Autoscaler and Multi-AZ

I have a EKS cluster with cluster autoscaler setup, spanning across three availability zones. I have deployed a Redis Cluster using helm and it works fine. Basically it is a statefulset of 6 replicas with dynamic PVC. Currently, my EKS cluster has…
2
votes
0 answers

Subdirectory of PV directory isn't mounted to persistent volume

I've got a PV that is backed by do-block-storage, and it's mounted to a stateful set, at /var/lib/postgresql, this is the full stateful set: apiVersion: apps/v1 kind: StatefulSet metadata: name: psql-api-set spec: selector: matchLabels: …
2
votes
1 answer

Add MountOptions to Kubernetes ingress rule from cli

I have a PV/PVC in my kubernetes cluster. apiVersion: v1 kind: PersistentVolume metadata: name: pv0003 spec: capacity: storage: 5Gi volumeMode: Filesystem accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Recycle …
2
votes
1 answer

How can I use AWS EBS Volumes with bare metal Kubernetes

I am using a manually created Kubernetes Cluster (using kubeadm) deployed on AWS ec2 instances (manually created ec2 instances). I want to use AWS EBS volumes for Kubernetes persistent volume. How can I use AWS EBS volumes within Kubernetes cluster…
2
votes
0 answers

Can a same PersistentVolume 'pv' bind to many PersistentVolumeClaims 'pvc' in different namespaces?

My kubernetes is on-premises not cloud provider. I can bind once, but when I create a second pvc it is pending. k get pvc --all-namespaces NAMESPACE NAME STATUS VOLUME CAPACITY …