5.6. OpenShift クラスター外から Apicurio Registry への HTTPS 接続の設定
以下の手順では、OpenShift クラスター外からの接続に対して HTTPS エッジターミネーションを使用したルートを公開するために Apicurio Registry デプロイメントを設定する方法を説明します。
前提条件
- Apicurio Registry Operator がインストールされている。
- セキュアなルートを作成するための OpenShift ドキュメント を読む。
手順
Apicurio Registry Operator によって作成される HTTP ルートの他に、2 つ目の Route を追加します。以下に例を示します。
kind: Route apiVersion: route.openshift.io/v1 metadata: [...] labels: app: example-apicurioregistry [...] spec: host: example-apicurioregistry-default.apps.example.com to: kind: Service name: example-apicurioregistry-service-9whd7 weight: 100 port: targetPort: 8080 tls: termination: edge insecureEdgeTerminationPolicy: Redirect wildcardPolicy: None注記insecureEdgeTerminationPolicy: Redirect設定プロパティーが設定されていることを確認してください。証明書を指定しない場合、OpenShift はデフォルトを使用します。または、以下のコマンドを使用して、カスタムの自己署名証明書を生成することもできます。
openssl genrsa 2048 > tls.key && openssl req -new -x509 -nodes -sha256 -days 365 -key tls.key -out tls.crt次に、OpenShift CLI を使用してルートを作成します。
oc create route edge \ --service=example-apicurioregistry-service-9whd7 \ --cert=tls.crt --key=tls.key \ --hostname=example-apicurioregistry-default.apps.example.com \ --insecure-policy=Redirect \ -n default