This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.27.7. サブパスの指定
volumeMounts.subPath
プロパティを使用して、ボリュームのルートではなく、ボリューム内のサブパス
を指定します。subPath
を使用すると、1 つの Pod でボリュームを共有して複数の用途に使用できます。
ボリューム内のファイルの一覧を表示するには、oc rsh
コマンドを実行します。
oc rsh <pod>
$ oc rsh <pod>
sh-4.2$ ls /path/to/volume/subpath/mount
example_file1 example_file2 example_file3
subPath
を指定します。
subPath の使用例