Difference between revisions of "VolumeMounts:"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
Tags: Mobile web edit, Mobile edit
Line 2: Line 2:
  
 
* https://kubernetes.io/docs/concepts/storage/volumes/
 
* https://kubernetes.io/docs/concepts/storage/volumes/
<pre>
+
 
apiVersion: v1
+
apiVersion: v1  
kind: Pod
+
kind: Pod
metadata:
+
metadata:
  name: test-ebs
+
  name: test-ebs
spec:
+
spec:
  containers:
+
  containers:
  - image: registry.k8s.io/test-webserver
+
  - image: registry.k8s.io/test-webserver
    name: test-container
+
    name: test-container
    volumeMounts:
+
    volumeMounts:
    - mountPath: /test-ebs
+
    - mountPath: /test-ebs
      name: test-volume
+
      name: test-volume
  volumes:
+
  volumes:
  - name: test-volume
+
  - name: test-volume
    # This AWS EBS volume must already exist.
+
    # This AWS EBS volume must already exist.
    awsElasticBlockStore:
+
    awsElasticBlockStore:
      volumeID: "<volume id>"
+
      volumeID: "<volume id>"
      fsType: ext4
+
      fsType: ext4
</pre>
+
 
  
 
== Related ==
 
== Related ==

Revision as of 09:32, 8 March 2023

apiVersion: v1 
kind: Pod
metadata:
  name: test-ebs
spec:
  containers:
  - image: registry.k8s.io/test-webserver
    name: test-container
    volumeMounts:
    - mountPath: /test-ebs
      name: test-volume
  volumes:
  - name: test-volume
    # This AWS EBS volume must already exist.
    awsElasticBlockStore:
      volumeID: "<volume id>"
      fsType: ext4


Related

See also

Advertising: