애플리케이션 개발


Red Hat OpenShift Service on AWS 4

애플리케이션을 위한 AWS에서 Red Hat OpenShift Service 구성

Red Hat OpenShift Documentation Team

초록

이 문서에서는 애플리케이션 배포를 위해 AWS(ROSA)에서 Red Hat OpenShift Service on AWS를 구성하는 방법에 대한 정보를 제공합니다. 여기에는 사용자 정의 와일드카드 도메인 설정이 포함됩니다.

1장. 배포

1.1. 애플리케이션용 사용자 정의 도메인

참고

AWS 4.14에서 Red Hat OpenShift Service부터 Custom Domain Operator는 더 이상 사용되지 않습니다. AWS 4.14의 Red Hat OpenShift Service에서 Ingress를 관리하려면 Ingress Operator를 사용합니다. AWS 4.13 및 이전 버전의 Red Hat OpenShift Service에는 기능이 변경되지 않습니다.

애플리케이션에 대한 사용자 정의 도메인을 구성할 수 있습니다. 사용자 정의 도메인은 AWS 애플리케이션에서 Red Hat OpenShift Service와 함께 사용할 수 있는 특정 와일드카드 도메인입니다.

1.1.1. 애플리케이션의 사용자 정의 도메인 구성

최상위 도메인( ScanSetting)은 AWS 클러스터에서 Red Hat OpenShift Service를 운영하는 고객이 소유합니다. Custom Domains Operator는 사용자 정의 인증서를 사용하여 2일 차 작업으로 새 수신 컨트롤러를 설정합니다. 그런 다음 이 Ingress 컨트롤러의 퍼블릭 DNS 레코드를 사용하여 사용자 정의 도메인에 사용할 와일드카드 CNAME 레코드를 만들 수 있습니다.

참고

Red Hat은 API 도메인을 제어하므로 사용자 정의 API 도메인이 지원되지 않습니다. 그러나 고객은 애플리케이션 도메인을 변경할 수 있습니다. 비공개 IngressController 가 있는 프라이빗 사용자 정의 도메인의 경우 CustomDomain CR에서 .spec.scopeInternal 로 설정합니다.

사전 요구 사항

  • dedicated-admin 권한이 있는 사용자 계정
  • 고유한 도메인 또는 와일드카드 도메인(예: *.apps.<company_name>.io)
  • CN=*.apps.<company_name>.io와 같은 사용자 정의 인증서 또는 와일드카드 사용자 정의 인증서
  • 최신 버전의 oc CLI가 설치된 클러스터에 액세스
중요

CustomDomain CR의 metadata/name: 섹션에서 예약된 이름 기본값 또는 apps * (예: apps 또는 apps2)를 사용하지 마십시오.

절차

  1. 개인 키 및 공용 인증서에서 새 TLS 시크릿을 생성합니다. 여기서 fullchain.pemprivkey.pem 은 공개 또는 개인 와일드카드 인증서입니다.

    예제

    $ oc create secret tls <name>-tls --cert=fullchain.pem --key=privkey.pem -n <my_project>

  2. CustomDomain CR(사용자 정의 리소스)을 생성합니다.

    예: <company_name>-custom-domain.yaml

    apiVersion: managed.openshift.io/v1alpha1
    kind: CustomDomain
    metadata:
      name: <company_name>
    spec:
      domain: apps.<company_name>.io 1
      scope: External
      loadBalancerType: Classic 2
      certificate:
        name: <name>-tls 3
        namespace: <my_project>
      routeSelector: 4
        matchLabels:
         route: acme
      namespaceSelector: 5
        matchLabels:
         type: sharded

    1
    사용자 정의 도메인입니다.
    2
    사용자 정의 도메인의 로드 밸런서 유형입니다. 이 유형은 네트워크 로드 밸런서를 사용하는 경우 기본 클래식 또는 NLB 일 수 있습니다.
    3
    이전 단계에서 생성한 시크릿입니다.
    4
    선택 사항: CustomDomain ingress에서 서비스를 제공하는 경로 집합을 필터링합니다. 값을 제공하지 않으면 기본값은 필터링되지 않습니다.
    5
    선택 사항: CustomDomain Ingress에서 서비스를 제공하는 네임스페이스 집합을 필터링합니다. 값을 제공하지 않으면 기본값은 필터링되지 않습니다.
  3. CR을 적용합니다.

    예제

    $ oc apply -f <company_name>-custom-domain.yaml

  4. 새로 생성된 CR의 상태를 가져옵니다.

    $ oc get customdomains

    출력 예

    NAME               ENDPOINT                                                    DOMAIN                       STATUS
    <company_name>     xxrywp.<company_name>.cluster-01.opln.s1.openshiftapps.com  *.apps.<company_name>.io     Ready

  5. 엔드포인트 값을 사용하여 관리형 DNS 공급자(예: Route53)에 새 와일드카드 CNAME 레코드 세트를 추가합니다.

    예제

    *.apps.<company_name>.io -> xxrywp.<company_name>.cluster-01.opln.s1.openshiftapps.com

  6. 새 애플리케이션을 생성하고 노출합니다.

    예제

    $ oc new-app --docker-image=docker.io/openshift/hello-openshift -n my-project

    $ oc create route <route_name> --service=hello-openshift hello-openshift-tls --hostname hello-openshift-tls-my-project.apps.<company_name>.io -n my-project
    $ oc get route -n my-project
    $ curl https://hello-openshift-tls-my-project.apps.<company_name>.io
    Hello OpenShift!

1.1.2. 사용자 정의 도메인의 인증서 갱신

oc CLI 툴을 사용하여 Custom Domains Operator(CDO)로 인증서를 갱신할 수 있습니다.

사전 요구 사항

  • 최신 버전의 oc CLI 툴이 설치되어 있습니다.

절차

  1. 새 보안 생성

    $ oc create secret tls <secret-new> --cert=fullchain.pem --key=privkey.pem -n <my_project>
  2. Patch CustomDomain CR

    $ oc patch customdomain <company_name> --type='merge' -p '{"spec":{"certificate":{"name":"<secret-new>"}}}'
  3. 이전 보안 삭제

    $ oc delete secret <secret-old> -n <my_project>

Legal Notice

Copyright © 2024 Red Hat, Inc.

OpenShift documentation is licensed under the Apache License 2.0 (https://www.apache.org/licenses/LICENSE-2.0).

Modified versions must remove all Red Hat trademarks.

Portions adapted from https://github.com/kubernetes-incubator/service-catalog/ with modifications by Red Hat.

Red Hat, Red Hat Enterprise Linux, the Red Hat logo, the Shadowman logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.

Linux® is the registered trademark of Linus Torvalds in the United States and other countries.

Java® is a registered trademark of Oracle and/or its affiliates.

XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.

MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.

Node.js® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.

The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation’s permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.

All other trademarks are the property of their respective owners.

Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.