docs: add PV duplicate example
This commit is contained in:
parent
092ea9b605
commit
d283c1f545
|
@ -236,8 +236,14 @@ sudo rmdir /mnt/data
|
|||
|
||||
You can now close the shell to your Node.
|
||||
|
||||
## Mounting the same persistentVolume in two places
|
||||
|
||||
{{< codenew file="pods/storage/pv-duplicate.yaml" >}}
|
||||
|
||||
You can perform 2 volume mounts on your nginx container:
|
||||
|
||||
`/usr/share/nginx/html` for the static website
|
||||
`/etc/nginx/nginx.conf` for the default config
|
||||
|
||||
<!-- discussion -->
|
||||
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: test
|
||||
spec:
|
||||
containers:
|
||||
- name: test
|
||||
image: nginx
|
||||
volumeMounts:
|
||||
- name: site-data
|
||||
mountPath: /usr/share/nginx/html
|
||||
subPath: html
|
||||
- name: config
|
||||
mountPath: /etc/nginx/nginx.conf
|
||||
subPath: nginx.conf
|
||||
volumes:
|
||||
- name: config
|
||||
persistentVolumeClaim:
|
||||
claimName: test-nfs-claim
|
Loading…
Reference in New Issue