Difference between revisions of "MountPath"

From wikieduonline
Jump to navigation Jump to search
(Created page with " extraVolumeMounts: | - name: mynewvolume mountPath: /usr/share/extras readOnly: true volumeMounts: - mountPath: /data name: persi...")
Tags: Mobile web edit, Mobile edit
 
Tags: Mobile web edit, Mobile edit
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{lc}}
 +
* https://kubernetes.io/docs/concepts/storage/volumes/
  
 
  extraVolumeMounts: |
 
  extraVolumeMounts: |
Line 9: Line 11:
 
     - mountPath: /data
 
     - mountPath: /data
 
       name: persistent-storage
 
       name: persistent-storage
     - mountPath: [[/var/run/secrets/]]kubernetes.io/serviceaccount
+
     - mountPath: [[/var/run/secrets/kubernetes.io/serviceaccount]]
 
       name: kube-api-access-jhnds
 
       name: kube-api-access-jhnds
 
       [[readOnly]]: true
 
       [[readOnly]]: true
 +
 +
 +
{{Alpine with volume}}
 +
 +
== Related ==
 +
* [[host_path]] in [[ECS]]
 +
 +
== See also ==
 +
* {{K8s volumes}}
 +
 +
 +
[[Category:Volumes]]

Latest revision as of 16:11, 8 February 2024

extraVolumeMounts: |
   - name: mynewvolume
     mountPath: /usr/share/extras
     readOnly: true


   volumeMounts:
   - mountPath: /data
     name: persistent-storage
   - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
     name: kube-api-access-jhnds
     readOnly: true


apiVersion: v1
kind: Pod
metadata:
  name: myalpinewithvolume
spec:
  containers:
  - name: alpine
    image: alpine:latest
    command: ['ash']
    tty: true
    stdin: true
    volumeMounts:
    - name: myvolume
      mountPath: /myvolume
  volumes:
  - name: myvolume
    persistentVolumeClaim:
      claimName: myPVCtoMount

Related[edit]

See also[edit]

Advertising: