Add YAML formatting to persisent volumes doc

This commit is contained in:
Satnam Singh 2015-07-19 01:05:32 +01:00
parent 1d2af3df7c
commit 764b5dfde0

View File

@ -116,8 +116,7 @@ A `PersistentVolume's` reclaim policy tells the cluster what to do with the volu
Each PV contains a spec and status, which is the specification and status of the volume.
```
```yaml
apiVersion: v1
kind: PersistentVolume
metadata:
@ -131,7 +130,6 @@ Each PV contains a spec and status, which is the specification and status of the
nfs:
path: /tmp
server: 172.17.0.2
```
### Capacity
@ -183,8 +181,7 @@ The CLI will show the name of the PVC bound to the PV.
Each PVC contains a spec and status, which is the specification and status of the claim.
```
```yaml
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
@ -195,7 +192,6 @@ spec:
resources:
requests:
storage: 8Gi
```
### Access Modes
@ -210,8 +206,7 @@ Claims, like pods, can request specific quantities of a resource. In this case,
Pods access storage by using the claim as a volume. Claims must exist in the same namespace as the pod using the claim. The cluster finds the claim in the pod's namespace and uses it to get the `PersistentVolume` backing the claim. The volume is then mounted to the host and into the pod.
```
```yaml
kind: Pod
apiVersion: v1
metadata:
@ -227,7 +222,6 @@ spec:
- name: mypd
persistentVolumeClaim:
claimName: myclaim
```