Merge pull request #713 from bodepd/host_path_update
Minor changes to volume.md
This commit is contained in:
@@ -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
|
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
|
* 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`
|
||||||
|
* 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
|
#### Example pod
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user