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
4
votes
3 answers

Kubernetes - Mounting Persistent Volume as root directory

I'm trying to create a new Kubernetes deployment that will allow me to persist a pod's state when it is restarted or shutdown. Just for some background, the Kubernetes instance is a managed Amazon EKS Cluster, and I am trying to incorporate an…
4
votes
2 answers

HostPath assign persistentVolume to the specific work node in cluster

Using kubeadm to create a cluster, I have a master and work node. Now I want to share a persistentVolume in the work node, which will be bound with Postgres pod. Expecting the code will create persistentVolume in the path /postgres of work node,…
ccd
  • 5,788
  • 10
  • 46
  • 96
4
votes
1 answer

Kubernetes Persistent Volumes deleting initial files

My app pod and nginx pod share a persistent volume for static files. When the app image is built with docker, the static files are generated in the location that the static persistent volume will later bind to when the containers are deployed.…
Mick
  • 413
  • 4
  • 14
4
votes
1 answer

Creating a PersistentVolume on Okteto Cloud

When I try to create a persistentVolume on Okteto Cloud with the following definition: kind: PersistentVolume apiVersion: v1 metadata: name: postgres-pv labels: type: local app: postgres spec: storageClassName: manual capacity: …
4
votes
3 answers

Kubernetes Delete Persistent Voulmes Created by hostPath

I created a PV and a PVC on docker-desktop and even after removing the pv and pvc the file still remains. When I re-create it, it attaches the same mysql database to new pods. How do you manually delete the files created by the hostPath? I suppose…
4
votes
1 answer

How to place SQLite database outside of NFS Persistent Volume

I have a multi-node (2) Kubernetes cluster running on bare metal. I understand that 1. hostPath is bad for production and 2. hostPath Persistent Volumes are not supported for multi-node setups. Is there a way that I can safely run apps that are…
James Teague II
  • 279
  • 5
  • 13
4
votes
2 answers

Is it possible to have PVC's with the same name accross different namespace when using different PV's in Kubernetes?

I have 2 different namespace: prod-01 and prod-02, What I want to do is build a copy of my prod-01 into prod-02 namespace keeping the same names for its pvcs, so that I don't have to maintain 2 sets of charts for each different namespace. Here's…
4
votes
1 answer

How to limit the amount of disk used by a Kubernetes emptyDir Volume?

If I have a buggy app in a container that is constantly writing to an emptyDir volume it could use up all the space on the worker node and affect the performance of other pods / containers on the node. Thus breaking the expectation that containers…
ams
  • 60,316
  • 68
  • 200
  • 288
4
votes
2 answers

Kubernetes AKS Persistent Volume Disk Claims To Multiple Nodes

How can I attach 100GB Persistent Volume Disk to Each Node in the AKS Kubernetes Cluster? We are using Kubernetes on Azure using AKS. We have a scenario where we need to attach Persistent Volumes to each Node in our AKS Cluster. We run 1 Docker…
4
votes
3 answers

Kubernetes: Managing uploaded user content

I have this idea for what I think should happen with my project, but I want to check in and see if this works on a theoretical level first. Basically I am working on a Django site that is run on Kubernetes, but am struggling a little bit about which…
4
votes
1 answer

How to create an kubernetes NFS volume on Google Container Engine

I am trying to create a kubernetes NFS volume on Google Container Engine (GKE) and get it used by a deployment. I did this in several steps as it shown in this github repository kubernetes-nfs-volume-on-gke: Create a GKE cluster and GCE persistent…
4
votes
1 answer

Can a PersistentVolumeClaim bind to multiple PersistentVolumes?

I have a GCE Container Cluster composed of 3 nodes. On every node I run a POD like that one: apiVersion: extensions/v1beta1 kind: Deployment metadata: name: test-deployment spec: replicas: 3 template: metadata: labels: app:…
Paolone
  • 475
  • 1
  • 7
  • 16
3
votes
1 answer

Persist data inside Azure container app that runs Postgres DB

I am new to Azure Container Apps. I had a requirement to deploy set of applications to Azure container apps. There was a problem with the setup when I deploy my Postgres DB as container when the container shut down data in the container will…
3
votes
2 answers

What is the meaning of the type/o/device flags in driver_opts in the docker-compose file?

I am working on a project where I have to create costum docker containers with costum volumes etc. As I have to use some driver_opts, I am wondering, what the flags type: XXX o: XXX device: XXX in a docker-compose file actually mean. I see all the…
user15421218
3
votes
1 answer

Copy files in persistent volume kubernetes

I want to add or copy files into persistent volume and then use it in container using volume mount ?any help
Ameer khan
  • 49
  • 1
  • 3