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.3.5.9.4. 特定のコンテナーへのストレージの追加
devfile に複数のコンテナーがある場合、odo storage create
コマンドで --container
フラグを使用して、ストレージを割り当てるコンテナーを指定できます。
以下の例は、複数のコンテナーを持つ devfile の抜粋です。
この例では、nodejs1
と nodejs2
の 2 つのコンテナーがあります。ストレージを nodejs2
コンテナーに割り当てるには、以下のコマンドを使用します。
odo storage create --container
$ odo storage create --container
出力例:
odo storage create store --path /data --size 1Gi --container nodejs2
$ odo storage create store --path /data --size 1Gi --container nodejs2
✓ Added storage store to nodejs-testing-xnfg
Please use `odo push` command to make the storage accessible to the component
odo storage list
コマンドを使用して、ストレージリソースを一覧表示できます。
odo storage list
$ odo storage list
出力例:
The component 'nodejs-testing-xnfg' has the following storage attached: NAME SIZE PATH CONTAINER STATE store 1Gi /data nodejs2 Not Pushed
The component 'nodejs-testing-xnfg' has the following storage attached:
NAME SIZE PATH CONTAINER STATE
store 1Gi /data nodejs2 Not Pushed