persistent-volumes

Can I rely on volumeClaimTemplates naming convention?

做~自己de王妃 提交于 2019-12-03 14:10:43
I want to setup a pre-defined PostgreSQL cluster in a bare meta kubernetes 1.7 with local PV enable. I have three work nodes. I create local PV on each node and deploy the stateful set successfully (with some complex script to setup Postgres replication). However I'm noticed that there's a kind of naming convention between the volumeClaimTemplates and PersistentVolumeClaim. For example apiVersion: apps/v1beta1 kind: StatefulSet metadata: name: postgres volumeClaimTemplates: - metadata: name: pgvolume The created pvc are pgvolume-postgres-0 , pgvolume-postgres-1 , pgvolume-postgres-2 . With

how to bound a Persistent volume claim with a gcePersistentDisk?

老子叫甜甜 提交于 2019-12-03 13:46:36
问题 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 the PersistentVolume and the PersistentVolumeClaim # pv-pvc.yml apiVersion: v1 kind: PersistentVolume metadata: name: nfs-pv spec: capacity: storage: 2Gi accessModes: - ReadWriteOnce gcePersistentDisk: pdName: gce-nfs-disk fsType: ext4 ---

Kubernetes NFS persistent volumes permission denied

风格不统一 提交于 2019-11-30 17:17:42
问题 I have an application running over a POD in Kubernetes. I would like to store some output file logs on a persistent storage volume. In order to do that, I created a volume over the NFS and bound it to the POD through the related volume claim. When I try to write or accede the shared folder I got a "permission denied" message, since the NFS is apparently read-only. The following is the json file I used to create the volume: { "kind": "PersistentVolume", "apiVersion": "v1", "metadata": { "name"