第5章 オフラインモードの有効化
オフラインモードを有効にすることで、インターネットに接続されていないクラスターに対して Red Hat Advanced Cluster Security for Kubernetes を使用できます。オフラインモードでは、Red Hat Advanced Cluster Security for Kubernetes コンポーネントはインターネット上のアドレスまたはホストに接続しません。
Red Hat Advanced Cluster Security for Kubernetes は、ユーザーが指定したホスト名、IP アドレス、またはその他のリソースがインターネット上にあるかどうかを判断しません。たとえば、インターネット上でホストされている Docker レジストリーと統合しようとしても、Red Hat Advanced Cluster Security for Kubernetes はこのリクエストをブロックしません。
Red Hat Advanced Cluster Security for Kubernetes をオフラインモードでデプロイして操作するには:
- RHACS イメージをダウンロードして、クラスターにインストールします。OpenShift Container Platform を使用している場合は、Operator Lifecycle Manager (OLM) および OperatorHub を使用して、インターネットに接続されているワークステーションにイメージをダウンロードできます。次に、ワークステーションは、セキュアクラスターにも接続されているミラーレジストリーにイメージをプッシュします。他のプラットフォームの場合は、イメージを直接ダウンロードする で説明されているように、Skopeo や Docker などのプログラムを使用してリモートレジストリーからイメージをプルし、独自のプライベートレジストリーにプッシュできます。
- インストール中にオフラインモードを有効にします。
- (オプション) 新しい定義ファイルをアップロードして、Scanner の脆弱性リストを定期的に更新します。
- (オプション) 必要に応じて、新しいカーネルサポートパッケージをアップロードして、より多くのカーネルバージョンでランタイムコレクションのサポートを追加します。
オフラインモードを有効にできるのはインストール中のみで、アップグレード中は有効にできません。
5.1. オフラインで使用するためのイメージのダウンロード リンクのコピーリンクがクリップボードにコピーされました!
5.1.1. イメージを直接ダウンロードする リンクのコピーリンクがクリップボードにコピーされました!
Red Hat Advanced Cluster Security for Kubernetes イメージを手動でプル、再タグ付け、およびレジストリーにプッシュできます。現在のバージョンのイメージバンドルに含まれているイメージは次のとおりです。
-
registry.redhat.io/advanced-cluster-security/rhacs-main-rhel8:4.0.5
-
registry.redhat.io/advanced-cluster-security/rhacs-scanner-rhel8:4.0.5
-
registry.redhat.io/advanced-cluster-security/rhacs-scanner-db-rhel8:4.0.5
-
registry.redhat.io/advanced-cluster-security/rhacs-collector-rhel8:4.0.5
-
registry.redhat.io/advanced-cluster-security/rhacs-collector-slim-rhel8:4.0.5
5.1.1.1. イメージのタグの付け直し リンクのコピーリンクがクリップボードにコピーされました!
Docker コマンドラインインターフェイスを使用して、イメージをダウンロードしてタグを付け直すことができます。
イメージにタグを付け直すときは、イメージの名前とタグを維持する必要があります。たとえば、以下を使用します:
docker tag registry.redhat.io/advanced-cluster-security/rhacs-main-rhel8:4.0.5 <your_registry>/rhacs-main-rhel8:4.0.5
$ docker tag registry.redhat.io/advanced-cluster-security/rhacs-main-rhel8:4.0.5 <your_registry>/rhacs-main-rhel8:4.0.5
そして、次の例のようにタグを付け直さないでください。
docker tag registry.redhat.io/advanced-cluster-security/rhacs-main-rhel8:4.0.5 <your_registry>/other-name:latest
$ docker tag registry.redhat.io/advanced-cluster-security/rhacs-main-rhel8:4.0.5 <your_registry>/other-name:latest
手順
レジストリーにログインします。
docker login registry.redhat.io
$ docker login registry.redhat.io
Copy to Clipboard Copied! Toggle word wrap Toggle overflow イメージをプルします:
docker pull <image>
$ docker pull <image>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow イメージにタグを付け直します。
docker tag <image> <new_image>
$ docker tag <image> <new_image>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 更新されたイメージをレジストリーにプッシュします。
docker push <new_image>
$ docker push <new_image>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow