20.7. サブパスの指定
volumeMounts.subPath プロパティーを使用し、ボリュームのルートの代わりにボリューム内で subPath を指定します。 l>subPath により、単一 Pod で複数の使用目的のために 1 つのボリュームを共有できます。
ボリューム内のファイルの一覧を表示するには、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 を指定します。
subPath の使用例