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.2.3.6. サービス CA バンドルの変更用 Webhook 設定への追加
MutatingWebhookConfiguration
オブジェクトに service.beta.openshift.io/inject-cabundle=true
のアノテーションを付け、各 Webhook の clientConfig.caBundle
フィールドにサービス CA バンドルを設定できます。これにより、Kubernetes API サーバーはターゲットに設定されたエンドポイントのセキュリティーを保護するために使用されるサービス CA 証明書を検証することができます。
異なる Webhook に異なる CA バンドルを指定する必要がある受付 Webhook 設定にはこのアノテーションを設定しないでください。これを実行する場合、サービス CA バンドルはすべての Webhook について挿入されます。
手順
変更用 Webhook 設定に
service.beta.openshift.io/inject-cabundle=true
のアノテーションを付けます。oc annotate mutatingwebhookconfigurations <mutating_webhook_name> \ service.beta.openshift.io/inject-cabundle=true
$ oc annotate mutatingwebhookconfigurations <mutating_webhook_name> \
1 service.beta.openshift.io/inject-cabundle=true
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
<mutatingwebhook-name>
を、アノテーションを付ける変更用 webhook 設定の名前に置き換えます。
たとえば、以下のコマンドを使用して変更用 webhook 設定
test1
にアノテーションを付けます。oc annotate mutatingwebhookconfigurations test1 service.beta.openshift.io/inject-cabundle=true
$ oc annotate mutatingwebhookconfigurations test1 service.beta.openshift.io/inject-cabundle=true
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 変更用 webhook 設定を表示して、サービス CA バンドルが挿入されていることを確認します。
oc get mutatingwebhookconfigurations <mutating_webhook_name> -o yaml
$ oc get mutatingwebhookconfigurations <mutating_webhook_name> -o yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow CA バンドルは、YAML 出力のすべての Webhook の
clientConfig.caBundle
フィールドに表示されます。Copy to Clipboard Copied! Toggle word wrap Toggle overflow