5.4. 기본 원격 다중 네트워크 메시 설치


두 OpenShift Container Platform 클러스터의 기본 원격 다중 네트워크 토폴로지에 Istio를 설치합니다.

참고

이 절차에서 CLUSTER1 은 동부 클러스터이며 CLUSTER2 는 서부 클러스터입니다. 동 클러스터는 기본 클러스터이고 서부 클러스터는 원격 클러스터입니다.

두 개 이상의 클러스터에 걸쳐 메시에 대해 이러한 지침을 조정할 수 있습니다.

사전 요구 사항

  • 메시를 구성하는 모든 클러스터에 OpenShift Service Mesh 3 Operator를 설치했습니다.
  • "멀티 클러스터 메시의 인증서 생성"을 완료했습니다.
  • "다중 클러스터 토폴로지에 인증서 적용"을 완료했습니다.
  • Istio CNI(Container Network Interface) 리소스를 생성했습니다.
  • 이러한 지침을 실행하는 데 사용할 istioctl 이 랩탑에 설치되어 있습니다.

프로세스

  1. 다음 명령을 실행하여 설치할 Istio 버전을 정의하는 ISTIO_VERSION 환경 변수를 생성합니다.

    $ export ISTIO_VERSION=1.24.1
  2. 동부 클러스터에 Istio를 설치합니다.

    1. 다음 명령을 실행하여 동 클러스터의 기본 네트워크를 설정합니다.

      $ oc --context="${CTX_CLUSTER1}" label namespace istio-system topology.istio.io/network=network1
    2. 다음 명령을 실행하여 동 클러스터에 Istio 리소스를 생성합니다.

      $ cat <<EOF | oc --context "${CTX_CLUSTER1}" apply -f -
      apiVersion: sailoperator.io/v1alpha1
      kind: Istio
      metadata:
        name: default
      spec:
        version: v${ISTIO_VERSION}
        namespace: istio-system
        values:
          global:
            meshID: mesh1
            multiCluster:
              clusterName: cluster1
            network: network1
            externalIstiod: true 1
      EOF
      1
      이를 통해 동 클러스터에 컨트롤 플레인이 설치되어 다른 원격 클러스터의 외부 컨트롤 플레인 역할을 할 수 있습니다.
    3. 다음 명령을 실행하여 컨트롤 플레인에서 "Ready" 상태 조건을 반환할 때까지 기다립니다.

      $ oc --context "${CTX_CLUSTER1}" wait --for condition=Ready istio/default --timeout=3m
    4. 다음 명령을 실행하여 동 클러스터에 East-West 게이트웨이를 생성합니다.

      $ oc --context "${CTX_CLUSTER1}" apply -f https://raw.githubusercontent.com/istio-ecosystem/sail-operator/main/docs/multicluster/east-west-gateway-net1.yaml
    5. 다음 명령을 실행하여 West 클러스터의 서비스가 컨트롤 플레인에 액세스할 수 있도록 게이트웨이를 통해 컨트롤 플레인을 노출합니다.

      $ oc --context "${CTX_CLUSTER1}" apply -n istio-system -f https://raw.githubusercontent.com/istio-ecosystem/sail-operator/main/docs/multicluster/expose-istiod.yaml
    6. 다음 명령을 실행하여 게이트웨이를 통해 애플리케이션 서비스를 노출합니다.

      $ oc --context "${CTX_CLUSTER1}" apply -n istio-system -f https://raw.githubusercontent.com/istio-ecosystem/sail-operator/main/docs/multicluster/expose-services.yaml
  3. West 클러스터에 Istio를 설치합니다.

    1. 다음 명령을 실행하여 동 클러스터에서 실행 중인 East-West 게이트웨이의 IP 주소를 저장합니다.

      $ export DISCOVERY_ADDRESS=$(oc --context="${CTX_CLUSTER1}" \
          -n istio-system get svc istio-eastwestgateway \
          -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
    2. 다음 명령을 실행하여 West 클러스터에서 Istio 리소스를 생성합니다.

      $ cat <<EOF | oc --context "${CTX_CLUSTER2}" apply -f -
      apiVersion: sailoperator.io/v1alpha1
      kind: Istio
      metadata:
        name: default
      spec:
        version: v${ISTIO_VERSION}
        namespace: istio-system
        profile: remote
        values:
          istiodRemote:
            injectionPath: /inject/cluster/cluster2/net/network2
          global:
            remotePilotAddress: ${DISCOVERY_ADDRESS}
      EOF
    3. 다음 명령을 실행하여 동 클러스터의 컨트롤 플레인에서 관리하도록 West 클러스터의 istio-system 네임스페이스에 주석을 답니다.

      $ oc --context="${CTX_CLUSTER2}" annotate namespace istio-system topology.istio.io/controlPlaneClusters=cluster1
    4. 다음 명령을 실행하여 West 클러스터의 기본 네트워크를 설정합니다.

      $ oc --context="${CTX_CLUSTER2}" label namespace istio-system topology.istio.io/network=network2
    5. 다음 명령을 실행하여 서부 클러스터의 API 서버에 액세스할 수 있는 원격 시크릿을 동부 클러스터에 설치합니다.

      $ istioctl create-remote-secret \
        --context="${CTX_CLUSTER2}" \
        --name=cluster2 | \
        oc --context="${CTX_CLUSTER1}" apply -f -
    6. 다음 명령을 실행하여 Istio 리소스가 "Ready" 상태 조건을 반환할 때까지 기다립니다.

      $ oc --context "${CTX_CLUSTER2}" wait --for condition=Ready istio/default --timeout=3m
    7. 다음 명령을 실행하여 서부 클러스터에 East-West 게이트웨이를 만듭니다.

      $ oc --context "${CTX_CLUSTER2}" apply -f https://raw.githubusercontent.com/istio-ecosystem/sail-operator/main/docs/multicluster/east-west-gateway-net2.yaml
      참고

      West 클러스터는 원격 프로필과 함께 설치되므로 East 클러스터에서 애플리케이션 서비스를 노출하면 두 클러스터의 동부 게이트웨이에 노출됩니다.

Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

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

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

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

Red Hat 소개

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

© 2024 Red Hat, Inc.