mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 22:17:14 +00:00
Merge pull request #6192 from wattsteve/patch-2
Add NFS Volume Plugin Info to Docs
This commit is contained in:
commit
d11189f426
@ -17,7 +17,7 @@ and to select the type of media to use, for clusters that have several media typ
|
|||||||
|
|
||||||
## Types of Volumes
|
## Types of Volumes
|
||||||
|
|
||||||
Kubernetes currently supports three types of Volumes, but more may be added in the future.
|
Kubernetes currently supports multiple types of Volumes. The community welcomes additional contributions.
|
||||||
|
|
||||||
### EmptyDir
|
### EmptyDir
|
||||||
|
|
||||||
@ -84,4 +84,8 @@ desiredState:
|
|||||||
id: testpd
|
id: testpd
|
||||||
kind: Pod
|
kind: Pod
|
||||||
```
|
```
|
||||||
|
### NFS
|
||||||
|
|
||||||
|
Kubernetes NFS volumes allow an existing NFS share to be made available to containers within a pod.
|
||||||
|
|
||||||
|
[The NFS Pod example](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/examples/nfs/test.yaml) demonstrates how to specify the usage of an NFS volume within a pod. In this example one can see that a volumeMount called "myshare" is being mounted onto /var/www/html/mount-test in the container "testpd". The volume "myshare" is defined as type nfs, with the NFS server serving from 172.17.0.2 and exporting directory /tmp as the share. The mount being created in this example is not read only.
|
||||||
|
@ -6,12 +6,12 @@ desiredState:
|
|||||||
image: dockerfile/nginx
|
image: dockerfile/nginx
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
# name must match the volume name below
|
# name must match the volume name below
|
||||||
- name: nfs
|
- name: myshare
|
||||||
mountPath: "/var/www/html/mount-test"
|
mountPath: "/var/www/html/mount-test"
|
||||||
id: nfspd
|
id: nfspd
|
||||||
version: v1beta1
|
version: v1beta1
|
||||||
volumes:
|
volumes:
|
||||||
- name: nfs
|
- name: myshare
|
||||||
source:
|
source:
|
||||||
nfs:
|
nfs:
|
||||||
server: "172.17.0.2"
|
server: "172.17.0.2"
|
||||||
|
Loading…
Reference in New Issue
Block a user