Merge pull request #713 from bodepd/host_path_update

Minor changes to volume.md
pull/883/head
Phillip Wittrock 2016-07-18 14:56:28 -07:00 committed by GitHub
commit e95c54ae22
1 changed files with 24 additions and 0 deletions

View File

@ -117,6 +117,30 @@ Watch out when using this type of volume, because:
behave differently on different nodes due to different files on the nodes
* when Kubernetes adds resource-aware scheduling, as is planned, it will not be
able to account for resources used by a `hostPath`
* the directories created on the underlying hosts are only writable by root, you either need
to run your process as root in a priveleged container or modify the file permissions on
the host to be able to write to a `hostPath` volume
#### Example pod
```yaml
apiVersion: v1
kind: Pod
metadata:
name: test-pd
spec:
containers:
- image: gcr.io/google_containers/test-webserver
name: test-container
volumeMounts:
- mountPath: /test-pd
name: test-volume
volumes:
- name: test-volume
hostPath:
# directory location on host
path: /data
```
#### Example pod