Add example for hostPath volume type

This commit is contained in:
Rachel Willmer
2016-04-19 09:12:47 +01:00
parent f973b70cd4
commit 71539b23da
+21 -1
View File
@@ -117,6 +117,26 @@ Watch out when using this type of volume, because:
* when Kubernetes adds resource-aware scheduling, as is planned, it will not be * when Kubernetes adds resource-aware scheduling, as is planned, it will not be
able to account for resources used by a `hostPath` able to account for resources used by a `hostPath`
#### Example pod
```yaml
apiVersion: v1
kind: Pod
metadata:
name: test-hostpath
spec:
containers:
- image: myimage
name: test-container
volumeMounts:
- mountPath: /test-hostpath
name: test-volume
volumes:
- name: test-volume
hostPath:
path: /path/to/my/dir
```
### gcePersistentDisk ### gcePersistentDisk
A `gcePersistentDisk` volume mounts a Google Compute Engine (GCE) [Persistent A `gcePersistentDisk` volume mounts a Google Compute Engine (GCE) [Persistent
@@ -390,4 +410,4 @@ pods.
In the future, we expect that `emptyDir` and `hostPath` volumes will be able to In the future, we expect that `emptyDir` and `hostPath` volumes will be able to
request a certain amount of space using a [resource](/docs/user-guide/compute-resources) request a certain amount of space using a [resource](/docs/user-guide/compute-resources)
specification, and to select the type of media to use, for clusters that have specification, and to select the type of media to use, for clusters that have
several media types. several media types.