Konubinix' opinionated web of thoughts

Gce Persistent Disk

Fleeting

From https://kubernetes.io/docs/concepts/storage/volumes/#gcepersistentdisk

the contents of a PD are preserved and the volume is merely unmounted. This means that a PD can be pre-populated with data, and that data can be shared between pods.

You must create a PD using gcloud or the GCE API or UI before you can use it.

Simultaneous writers are not allowed

gcloud compute disks create –size=500GB –zone=us-central1-a my-data-disk

GCE persistent disk configuration example

apiVersion: v1
kind: Pod
metadata:
  name: test-pd
spec:
  containers:
  - image: k8s.gcr.io/test-webserver
    name: test-container
    volumeMounts:
    - mountPath: /test-pd
      name: test-volume
  volumes:
  - name: test-volume
    # This GCE PD must already exist.
    gcePersistentDisk:
      pdName: my-data-disk
      fsType: ext4

Notes pointant ici