Skip to main content
Version: 3.1

create-pvc-create-readonlymany-pvcs

  1. Add a persistentVolumeClaim subsection to the volumes section of your Pod, specifying the following fields and values:

    • readOnly: with the true value

    • claimName: with the name of the PVC you created in the step above

      apiVersion: v1
      kind: Pod
      metadata:
      name: pvpod
      spec:
      containers:
      - name: test-container
      image: gcr.io/google_containers/test-webserver
      volumeMounts:
      - name: test-vol
      mountPath: /test-portworx-volume
      volumes:
      - name: test-vol
      persistentVolumeClaim:
      claimName: pvcsc001
      readOnly: true