26.7. 하위 경로 지정
volumeMounts. 속성을 사용하여 볼륨의 루트 대신 볼륨 내부에 하위 경로를 지정합니다. subPath subPath 를 사용하면 단일 Pod에서 여러 용도에 대해 하나의 볼륨을 공유할 수 있습니다.
볼륨의 파일 목록을 보려면 oc rsh 명령을 실행합니다.
oc rsh <pod> sh-4.2$ ls /path/to/volume/subpath/mount example_file1 example_file2 example_file3
$ oc rsh <pod>
sh-4.2$ ls /path/to/volume/subpath/mount
example_file1 example_file2 example_file3
subPath를 지정합니다.
하위 경로 사용 예