From 71539b23da3f37f8908177efc29e362983a3531d Mon Sep 17 00:00:00 2001 From: Rachel Willmer Date: Tue, 19 Apr 2016 09:12:47 +0100 Subject: [PATCH] Add example for hostPath volume type --- docs/user-guide/volumes.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/docs/user-guide/volumes.md b/docs/user-guide/volumes.md index 44b9313d1e..f33289f9d8 100644 --- a/docs/user-guide/volumes.md +++ b/docs/user-guide/volumes.md @@ -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 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 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 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 -several media types. \ No newline at end of file +several media types.