Merge pull request #11532 from satnam6502/doc27

Add YAML formatting to persisent volumes doc
pull/6/head
Brian Grant 2015-07-18 17:13:53 -07:00
commit a9d67d8c18
1 changed files with 3 additions and 9 deletions

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. Each PV contains a spec and status, which is the specification and status of the volume.
``` ```yaml
apiVersion: v1 apiVersion: v1
kind: PersistentVolume kind: PersistentVolume
metadata: metadata:
@ -131,7 +130,6 @@ Each PV contains a spec and status, which is the specification and status of the
nfs: nfs:
path: /tmp path: /tmp
server: 172.17.0.2 server: 172.17.0.2
``` ```
### Capacity ### 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. Each PVC contains a spec and status, which is the specification and status of the claim.
``` ```yaml
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
apiVersion: v1 apiVersion: v1
metadata: metadata:
@ -195,7 +192,6 @@ spec:
resources: resources:
requests: requests:
storage: 8Gi storage: 8Gi
``` ```
### Access Modes ### 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. 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 kind: Pod
apiVersion: v1 apiVersion: v1
metadata: metadata:
@ -227,7 +222,6 @@ spec:
- name: mypd - name: mypd
persistentVolumeClaim: persistentVolumeClaim:
claimName: myclaim claimName: myclaim
``` ```