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.4. ボリュームの更新
既存のボリュームまたはボリュームマウントを更新することは、ボリュームの追加と同様ですが、--overwrite
オプションを使用します。
oc volume <object_type>/<name> --add --overwrite [options]
$ oc volume <object_type>/<name> --add --overwrite [options]
例
レプリケーションコントローラーの既存ボリューム r1 の既存のボリューム v1 を 既存の Persistent Volume Claim (永続ボリューム要求、PVC) pvc1 に置き換えます。
oc volume rc/r1 --add --overwrite --name=v1 --type=persistentVolumeClaim --claim-name=pvc1
$ oc volume rc/r1 --add --overwrite --name=v1 --type=persistentVolumeClaim --claim-name=pvc1
デプロイメント設定 d1 のマウントポイントをボリューム v1 の /opt に変更します。
oc volume dc/d1 --add --overwrite --name=v1 --mount-path=/opt
$ oc volume dc/d1 --add --overwrite --name=v1 --mount-path=/opt