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

How to extract volumeClaimTemplates to a separate PersistentVolumeClaim yaml file?

Let's say I have a StatefulSet definition apiVersion: v1 kind: StatefulSet metadata: name: web spec: ... volumeClaimTemplates: — metadata: name: www spec: resources: requests: storage: 1Gi This will create…
LEQADA
  • 1,913
  • 3
  • 22
  • 41
0
votes
1 answer

Jenkins Kubernetes: Mount subpath of volume

As far as i understood, the kubernetes api allows one to mount a subpath of a pvc into the container in the volumeMounts spec. In my example i want to mount the pvc my-pvc, but in the subdirectory /my-subpath to /my-mount. So the directory…
0
votes
2 answers

Network File share access on GKE cluster - Windows node pool

We are Containerizing dotnet application on GKE cluster(Windows node-pool). We have a requirement, where multiple pods can access same shared space(persistent volume). Also it should support "ReadWriteMany" AccessMode. We have explored below…
0
votes
1 answer

How to run a command on PersistentVolume creation?

I have a StatefulSet which looks like this apiVersion: v1 kind: StatefulSet metadata: name: web spec: ... volumeClaimTemplates: — metadata: name: www spec: resources: requests: storage: 1Gi It will create a…
LEQADA
  • 1,913
  • 3
  • 22
  • 41
0
votes
2 answers

Kubernetes Persistent Volumes With EBS (in EC2 instance)

Currently I am trying to have volume persistence for my MYSQL database using Kubernetes with Kubeadm. The environment is based on an amazon EC2 instance using EBS storage disks. As you can see below a storage class, a persistent volume as well as a…
0
votes
1 answer

Kubernetes - writing data to volume of StatefulSet

I am trying to create a StatefulSet. I want to create a file on the attached volume so i am using this command touch /data/test.txt but it seems like the container crashes because of that. Why would it do that? If i don't use the command everything…
0
votes
2 answers

Kubernetes provisioning PVC from GCE Persistent disk volume shows error

I am using a GCE cluster with 2 nodes, which I set up using kubeadm. Now I want to set up a persistent volume for postgresql to be deployed. I created a PVC and PV with a storageClass and also created a disk space with 10G in name postgres in the…
0
votes
2 answers

WSL Kubernetes Pod stuck in ContainerCreating state due to volume mount

I am working with Docker Desktop on Windows 10 as well as Windows Subsystem for Linux (WSL). I have a containerized app that I deploy to the local K8s cluster (courtesy of Docker Desktop). Typical story: all was working fine until one day a Docker…
0
votes
0 answers

OpenShift copy files to PVC from container

I have a weird issue and I am running out of ideas. I have an OpenShift deployment but unfortunately I don't hava RBAC access so any rsync and other goodies are not fine for me. Let's sum up... I have a storage created which is shared between 2…
dnmitev
  • 71
  • 10
0
votes
0 answers

Kubernetes pods wrting to persistent volume, need to push the logs to ElasticSearch

I have kubernetes pods writing logs to multiple log files using a persistent volume - nfs drive. I need a way to push the logs real time from the log files to ELastic Search. I am trying to set up a filebeat as the sidecar container but not sure how…
0
votes
1 answer

Mounting a path creates a new directory in kubernetes

I am facing issues when mounting a path.My objective is to make the data persistent even when the pod restarts.But its creating a new directory which doesnt have any of my config files. FROM centos:7 ENV DIR /binaries ENV PASS admin WORKDIR…
0
votes
3 answers

GKE migrate pv to a new cluster whithin the same GCloud project

I would like to move existing PVCs/PVs to a new GKE cluster in the same Google project. Can someone give me a hint how to do this? Thanks in advance!
0
votes
0 answers

Cloud provider not initialized properly

I created storageclass and persistentvolumeclaim in the vSphere infrastructure. However, I am getting an error when I checked persistentvolumeclaim using kubectl describe pvc pvc-name command: [root@kube-master-01 ~]# kubectl describe pvc…
0
votes
3 answers

CockroachDB Cluster on Kubernetes Pods Crashing

I'm trying to install a CockroachDB Helm chart on a 2 node Kubernetes cluster using this command: helm install my-release --set statefulset.replicas=2 stable/cockroachdb I have already created 2 persistent volumes: NAME CAPACITY ACCESS MODES…
Alex W
  • 37,233
  • 13
  • 109
  • 109
0
votes
1 answer

Connect Kubernetes Postgres pod to existing database stored on persistent volume

I am trying to connect a new Wiki.js app instance running in Kubernetes to a Postgres DB created from a prevous app instance and stored in a persistent volume. I get a CrashLoopBackOff try to start the postgres pod, looking at the logs they…
Ergin
  • 9,254
  • 1
  • 19
  • 28