2.8.3. 整合性シールド保護の有効化 (テクノロジープレビュー)
Red Hat Advanced Cluster Management for Kubernetes クラスターで整合性シールド保護を有効にして、Kubernetes リソースの整合性を保護します。
2.8.3.1. 前提条件 リンクのコピーリンクがクリップボードにコピーされました!
Red Hat Advanced Cluster Management マネージドクラスターで整合性シールド保護を有効にするには、以下の前提条件を満たす必要がある。
-
マネージドクラスターが含まれる Red Hat Advanced Cluster Management ハブクラスターをインストールしており、そのクラスターに対して
oc
またはkubectl
コマンドを使用するためのクラスター管理者権限がある。 整合性シールドをインストールする。整合性シールドをインストールする前に、Open Policy Agent または gatekeeper をクラスターにインストールする必要がある。整合性シールド Operator をインストールするには、以下の手順を実行する。
以下のコマンドを実行して、整合性シールドの namespace に整合性シールド Operator をインストールする。
kubectl create -f https://raw.githubusercontent.com/open-cluster-management/integrity-shield/master/integrity-shield-operator/deploy/integrity-shield-operator-latest.yaml
kubectl create -f https://raw.githubusercontent.com/open-cluster-management/integrity-shield/master/integrity-shield-operator/deploy/integrity-shield-operator-latest.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 以下のコマンドを使用して、整合性シールドカスタムリソースをインストールする。
kubectl create -f https://raw.githubusercontent.com/open-cluster-management/integrity-shield/master/integrity-shield-operator/config/samples/apis_v1_integrityshield.yaml -n integrity-shield-operator-system
kubectl create -f https://raw.githubusercontent.com/open-cluster-management/integrity-shield/master/integrity-shield-operator/config/samples/apis_v1_integrityshield.yaml -n integrity-shield-operator-system
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 整合性シールドには、クラスターで保護する必要があるリソースの署名および検証用の鍵のペアが必要である。署名と検証キーペアを設定する。
以下のコマンドを使用して新規の GPG キーを生成する。
gpg --full-generate-key
gpg --full-generate-key
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 以下のコマンドを使用して、新しい GPG 公開鍵をファイルにエクスポートする。
gpg --export signer@enterprise.com > /tmp/pubring.gpg
gpg --export signer@enterprise.com > /tmp/pubring.gpg
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
-
yq
をインストールして、Red Hat Advanced Cluster Management ポリシーに署名するスクリプトを実行する。 -
Integrity-shield 保護を有効にし、Red Hat Advanced Cluster Management に署名することで、
integrity-shield
リポジトリーからのソースの取得およびコミットが含まれる。Git をインストールする必要がある。