OpenShift Persistent Volume Claim Definition: Difference between revisions
Jump to navigation
Jump to search
(→Labels) |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 24: | Line 24: | ||
storage: 1Gi | storage: 1Gi | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang='json'> | |||
{ | |||
"apiVersion": "v1", | |||
"kind": "PersistentVolumeClaim", | |||
"metadata": { | |||
"name": "claim1" | |||
}, | |||
"spec": { | |||
"accessModes": [ "ReadWriteOnce" ], | |||
"resources": { | |||
"requests": { | |||
"storage": "1Gi" | |||
} | |||
} | |||
} | |||
} | |||
</syntaxhighlight> | |||
=Notes= | |||
==Labels== | |||
The labels specified under "metadata/labels" will be applied to the objects created based on this definition. |
Latest revision as of 03:56, 25 November 2017
External
Internal
Example
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: gogs-data
labels:
app: gogs
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
{
"apiVersion": "v1",
"kind": "PersistentVolumeClaim",
"metadata": {
"name": "claim1"
},
"spec": {
"accessModes": [ "ReadWriteOnce" ],
"resources": {
"requests": {
"storage": "1Gi"
}
}
}
}
Notes
Labels
The labels specified under "metadata/labels" will be applied to the objects created based on this definition.