You are viewing documentation for a release that is no longer maintainedSee documentation for the latest supported version 3 or the latest supported version 4. 5.5.6. Pod およびコンテナーへの/からのファイルのコピー Pod に/からファイルをコピーして、設定変更をテストしたり、診断情報を収集したりできます。 前提条件 cluster-admin ロールを持つユーザーとしてクラスターにアクセスできる。 API サービスが機能している。 OpenShift CLI (oc) がインストールされている。 手順 ファイルを Pod にコピーします。 $ oc cp <local_path> <pod_name>:/<path> -c <container_name> 1 1 -c オプションが指定されていない場合、Pod の最初のコンテナーが選択されます。 Pod からファイルをコピーします。 $ oc cp <pod_name>:/<path> -c <container_name><local_path> 1 1 -c オプションが指定されていない場合、Pod の最初のコンテナーが選択されます。 注記 oc cp が機能するには、tar バイナリーがコンテナー内で利用可能である必要があります。 戻る次へ