mirror of https://github.com/k3s-io/k3s
Use the same name in volumeMounts and volumes
In some example files of vSphere volumes, volumeMounts and volumes have different names. kubectl create will fail with error message saying the pod is invalid because volumeMount with the name is not found.pull/6/head
parent
7171f6fd5f
commit
336fa7cfda
|
@ -176,7 +176,7 @@
|
|||
- name: test-volume
|
||||
mountPath: /test-vmdk
|
||||
volumes:
|
||||
- name: vmdk-storage
|
||||
- name: test-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: pvc0001
|
||||
```
|
||||
|
@ -315,7 +315,7 @@
|
|||
- name: test-volume
|
||||
mountPath: /test-vmdk
|
||||
volumes:
|
||||
- name: vmdk-storage
|
||||
- name: test-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: pvcsc001
|
||||
```
|
||||
|
|
|
@ -10,6 +10,6 @@ spec:
|
|||
- name: test-volume
|
||||
mountPath: /test-vmdk
|
||||
volumes:
|
||||
- name: vmdk-storage
|
||||
- name: test-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: pvc0001
|
||||
claimName: pvc0001
|
||||
|
|
|
@ -10,6 +10,6 @@ spec:
|
|||
- name: test-volume
|
||||
mountPath: /test-vmdk
|
||||
volumes:
|
||||
- name: vmdk-storage
|
||||
- name: test-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: pvcsc0001
|
||||
claimName: pvcsc0001
|
||||
|
|
Loading…
Reference in New Issue