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.4. サービス CA バンドルの API サービスへの追加
APIService オブジェクトに service.beta.openshift.io/inject-cabundle=true のアノテーションを付け、その spec.caBundle フィールドにサービス CA バンドルを設定できます。これにより、Kubernetes API サーバーはターゲットに設定されたエンドポイントのセキュリティーを保護するために使用されるサービス CA 証明書を検証することができます。
手順
API サービスに
service.beta.openshift.io/inject-cabundle=trueのアノテーションを付けます。oc annotate apiservice <api_service_name> \ service.beta.openshift.io/inject-cabundle=true$ oc annotate apiservice <api_service_name> \1 service.beta.openshift.io/inject-cabundle=trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
<api_service_name>を、アノテーションを付ける API サービスの名前に置き換えます。
たとえば、以下のコマンドを使用して API サービス
test1にアノテーションを付けます。oc annotate apiservice test1 service.beta.openshift.io/inject-cabundle=true
$ oc annotate apiservice test1 service.beta.openshift.io/inject-cabundle=trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow API サービスを表示し、サービス CA バンドルが挿入されていることを確認します。
oc get apiservice <api_service_name> -o yaml
$ oc get apiservice <api_service_name> -o yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow CA バンドルは YAML 出力の
spec.caBundleフィールドに表示されます。Copy to Clipboard Copied! Toggle word wrap Toggle overflow