Here is the sample template for single PersistentVolumeClaim with name : claim1
apiVersion: "v1"
kind: "PersistentVolumeClaim"
metadata:
name: "claim1"
spec:
accessModes:
- "ReadWriteOnce"
resources:
requests:
storage: "5Gi"
volumeName: "pv0001"
How can i add multiple PersistentVolumeClaim in the same template file. For example adding claim2
I tried copy paste the same template from below it and change claim1 to claim2 but in openshift UI while importing the template it gives a warning : Duplicated Mapping key kind: PersistentVolumeClaim
Update:
I have tried using ---
as mentioned in the comments. But that throws a error Expected a single document in the stream but found more
in the openshift UI while importing the yaml
---
in a yaml file likely would work just fine withoc create -f file.yml
from the CLI – Abstergent