5.5. OpenShift 클러스터 외부에서 Apicurio Registry에 대한 HTTPS 연결 구성

다음 절차에서는 OpenShift 클러스터 외부의 연결에 대해 HTTPS 에지 종료 경로를 노출하도록 Apicurio Registry 배포를 구성하는 방법을 보여줍니다.

사전 요구 사항

절차

  1. Service Registry Operator에서 생성한 HTTP 경로 외에 두 번째 경로를 추가합니다. 다음 예제를 참조하십시오.

    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 > host.key &&
    openssl req -new -x509 -nodes -sha256 -days 365 -key host.key -out host.cert

    그런 다음 OpenShift CLI를 사용하여 경로를 생성합니다.

    oc create route edge \
      --service=example-apicurioregistry-service-9whd7 \
      --cert=host.cert --key=host.key \
      --hostname=example-apicurioregistry-default.apps.example.com \
      --insecure-policy=Redirect \
      -n default