You are viewing documentation for a release that is no longer maintained. To view the documentation for the most recent version, see the latest RHACS docs.
第4章 Helm チャートを使用したインストール
4.1. Helm チャートを使用した迅速なインストール リンクのコピーリンクがクリップボードにコピーされました!
Red Hat Advanced Cluster Security for Kubernetes は、OpenShift Container Platform クラスターに一連のサービスをインストールします。このトピックでは、カスタマイズなしで OpenShift Container Platform クラスターに Red Hat Advanced Cluster Security for Kubernetes をインストールするための手順について説明します。
次の手順は、Red Hat Advanced Cluster Security for Kubernetes をすばやくインストールするためのハイレベルなインストールフローを表しています。
インストールする前に:
4.1.1. Helm チャートリポジトリーの追加 リンクのコピーリンクがクリップボードにコピーされました!
手順
Red Hat Advanced Cluster Security for Kubernetes チャートリポジトリーを追加します。
helm repo add rhacs https://mirror.openshift.com/pub/rhacs/charts/
$ helm repo add rhacs https://mirror.openshift.com/pub/rhacs/charts/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Red Hat Advanced Cluster Security for Kubernetes の Helm リポジトリーには、異なるコンポーネントをインストールするための 2 つの Helm チャートが含まれています。
集中型コンポーネント (Central および Scanner) をインストールするためのセントラルサービス Helm チャート (
central-services
)。注記一元化されたコンポーネントを 1 回だけデプロイし、同じインストールを使用して複数の個別のクラスターをモニターできます。
クラスターごと (Sensor および Admission Controller) およびノードごと (Collector) のコンポーネントをインストールするための Secured Cluster Services Helm チャート (
secured-cluster-services
)。注記モニターする各クラスターにクラスターごとのコンポーネントをデプロイし、モニターするすべてのノードにノードごとのコンポーネントをデプロイします。
検証
次のコマンドを実行して、追加されたチャートリポジトリーを確認します。
helm search repo -l rhacs/
$ helm search repo -l rhacs/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.1.2. カスタマイズせずにセントラルサービス Helm チャートをインストールする リンクのコピーリンクがクリップボードにコピーされました!
次の手順を使用して、Central-Services
Helm チャートをインストールし、集中型コンポーネント (Central および Scanner) をデプロイします。
手順
次のコマンドを実行して Central services をインストールし、ルートを使用して Central を公開します。
helm install -n stackrox \ --create-namespace stackrox-central-services rhacs/central-services \ --set imagePullSecrets.allowNone=true \ --set central.exposure.route.enabled=true
$ helm install -n stackrox \ --create-namespace stackrox-central-services rhacs/central-services \ --set imagePullSecrets.allowNone=true \ --set central.exposure.route.enabled=true
Copy to Clipboard Copied! Toggle word wrap Toggle overflow または、次のコマンドを実行して Central services をインストールし、ロードバランサーを使用して Central を公開します。
helm install -n stackrox \ --create-namespace stackrox-central-services rhacs/central-services \ --set imagePullSecrets.allowNone=true \ --set central.exposure.loadBalancer.enabled=true
$ helm install -n stackrox \ --create-namespace stackrox-central-services rhacs/central-services \ --set imagePullSecrets.allowNone=true \ --set central.exposure.loadBalancer.enabled=true
Copy to Clipboard Copied! Toggle word wrap Toggle overflow または、次のコマンドを実行して Central services をインストールし、port forward を使用して Central を公開します。
helm install -n stackrox \ --create-namespace stackrox-central-services rhacs/central-services \ --set imagePullSecrets.allowNone=true
$ helm install -n stackrox \ --create-namespace stackrox-central-services rhacs/central-services \ --set imagePullSecrets.allowNone=true
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
外部サービスに接続するためにプロキシーが必要なクラスターに Red Hat Cluster Security for Kubernetes をインストールする場合は、proxyConfig
パラメーターを使用してプロキシー設定を指定する必要があります。以下に例を示します。
インストールコマンドの出力は次のとおりです。
- 自動的に生成された管理者パスワード。
- すべての設定値を保存するための手順。
- Helm が生成する警告。
4.1.3. init バンドルの生成 リンクのコピーリンクがクリップボードにコピーされました!
SecuredCluster
リソースをクラスターにインストールする前に、init バンドルを作成する必要があります。SecuredCluster
がインストールおよび設定されているクラスターは、このバンドルを使用して Central で認証します。
4.1.3.1. roxctl CLI を使用した init バンドルの生成 リンクのコピーリンクがクリップボードにコピーされました!
roxctl
CLI を使用して、シークレットを含む init バンドルを作成できます。
前提条件
ROX_API_TOKEN
および ROX_CENTRAL_ADDRESS
環境変数を設定しました。
ROX_API_TOKEN
およびROX_CENTRAL_ADDRESS
環境変数を設定します。export ROX_API_TOKEN=<api_token>
$ export ROX_API_TOKEN=<api_token>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow export ROX_CENTRAL_ADDRESS=<address>:<port_number>
$ export ROX_CENTRAL_ADDRESS=<address>:<port_number>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
手順
次のコマンドを実行して、シークレットを含むクラスター初期化バンドルを生成します。
roxctl -e "$ROX_CENTRAL_ADDRESS" \ central init-bundles generate <cluster_init_bundle_name> \ --output cluster_init_bundle.yaml
$ roxctl -e "$ROX_CENTRAL_ADDRESS" \ central init-bundles generate <cluster_init_bundle_name> \ --output cluster_init_bundle.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
roxctl -e "$ROX_CENTRAL_ADDRESS" \ central init-bundles generate <cluster_init_bundle_name> \ --output-secrets cluster_init_bundle.yaml
$ roxctl -e "$ROX_CENTRAL_ADDRESS" \
central init-bundles generate <cluster_init_bundle_name> \
--output-secrets cluster_init_bundle.yaml
このバンドルにはシークレットが含まれているため、安全に保管してください。同じバンドルを使用して、複数のセキュリティー保護されたクラスターを設定できます。
4.1.4. カスタマイズせずに secured-cluster-services Helm チャートをインストールする リンクのコピーリンクがクリップボードにコピーされました!
次の手順を使用して、secured-cluster-services
Helm チャートをインストールし、クラスターごとおよびノードごとのコンポーネント (Sensor、Admission Controller、および Collector) をデプロイします。
Unified Extensible Firmware Interface (UEFI) があり、Secure Boot が有効になっているシステムに Collector をインストールするには、カーネルモジュールが署名されておらず、UEFI ファームウェアが署名されていないパッケージをロードできないため、eBPF プローブを使用する必要があります。Collector は、開始時に Secure Boot ステータスを識別し、必要に応じて eBPF プローブに切り替えます。
前提条件
- Central service を公開するアドレスとポート番号が必要です。
手順
他の Kubernetes ベースのクラスターで次のコマンドを実行します。
helm install -n stackrox --create-namespace \ stackrox-secured-cluster-services rhacs/secured-cluster-services \ -f <path_to_cluster_init_bundle.yaml> \ --set clusterName=<name_of_the_secured_cluster> \ --set centralEndpoint=<endpoint_of_central_service>
$ helm install -n stackrox --create-namespace \ stackrox-secured-cluster-services rhacs/secured-cluster-services \ -f <path_to_cluster_init_bundle.yaml> \
1 --set clusterName=<name_of_the_secured_cluster> \ --set centralEndpoint=<endpoint_of_central_service>
2 Copy to Clipboard Copied! Toggle word wrap Toggle overflow OpenShift Container Platform クラスターで以下のコマンドを実行します。
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.1.5. インストールの検証 リンクのコピーリンクがクリップボードにコピーされました!
インストールが完了したら、いくつかの脆弱なアプリケーションを実行し、RHACS ポータルに移動して、セキュリティー評価とポリシー違反の結果を評価します。
次のセクションにリストされているサンプルアプリケーションには重大な脆弱性が含まれており、Red Hat Advanced Cluster Security for Kubernetes のビルドおよびデプロイ時の評価機能を検証するように特別に設計されています。
インストールの検証
公開方法に基づいて RHACS ポータルのアドレスを見つけます。
ルートの場合。
oc get route central -n stackrox
$ oc get route central -n stackrox
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ロードバランサーの場合。
oc get service central-loadbalancer -n stackrox
$ oc get service central-loadbalancer -n stackrox
Copy to Clipboard Copied! Toggle word wrap Toggle overflow port forward の場合:
以下のコマンドを実行します。
oc port-forward svc/central 18443:443 -n stackrox
$ oc port-forward svc/central 18443:443 -n stackrox
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
https://localhost:18443/
に移動します。
OpenShift Container Platform CLI を使用して、新しいプロジェクトを作成します。
oc new-project test
$ oc new-project test
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 重大な脆弱性を持ついくつかのアプリケーションを開始します。
oc run shell --labels=app=shellshock,team=test-team \ --image=vulnerables/cve-2014-6271 -n test oc run samba --labels=app=rce \ --image=vulnerables/cve-2017-7494 -n test
$ oc run shell --labels=app=shellshock,team=test-team \ --image=vulnerables/cve-2014-6271 -n test $ oc run samba --labels=app=rce \ --image=vulnerables/cve-2017-7494 -n test
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Red Hat Advanced Cluster Security for Kubernetes は、これらのデプロイメントがクラスターに送信されるとすぐに、これらのデプロイメントを自動的にスキャンしてセキュリティーリスクとポリシー違反を検出します。RHACS ポータルに移動して、違反を表示します。デフォルトのユーザー名 admin と生成されたパスワードを使用して RHACS ポータルにログインできます。