Apigee Hybrid를 버전 1.5로 업그레이드

버전 1.5.10으로 업그레이드 개요

Apigee Hybrid 업그레이드 절차는 다음과 같은 섹션으로 정리됩니다.

  1. 하이브리드 설치를 백업합니다.
  2. Kubernetes 버전을 확인하고 올바르게 업그레이드합니다.
  3. ASM을 업그레이드합니다.
  4. Hybrid 런타임 버전 1.5 설치

선행 조건

버전 1.5로 업그레이드

  1. 이 안내에서는 apigeectl을 설치한 파일 시스템에서 디렉터리의 환경 변수 APIGEECTL_HOME을 사용합니다. 필요한 경우 apigeectl 디렉터리로 cd하고 다음 명령어를 사용하여 변수를 정의합니다.

    Linux

    export APIGEECTL_HOME=$PWD
    echo $APIGEECTL_HOME

    MacOS

    export APIGEECTL_HOME=$PWD
    echo $APIGEECTL_HOME

    Windows

    set APIGEECTL_HOME=%CD%
    echo %APIGEECTL_HOME%
  2. (권장사항) 버전 1.4 $APIGEECTL_HOME/ 디렉터리의 백업 사본을 만듭니다. 예를 들면 다음과 같습니다.
    tar -czvf $APIGEECTL_HOME/../apigeectl-v1.4-backup.tar.gz $APIGEECTL_HOME
  3. (권장사항) Cassandra 백업 및 복구의 안내에 따라 Cassandra 데이터베이스를 백업합니다.
  4. Kubernetes 플랫폼을 Hybrid 1.5에서 지원되는 버전으로 업그레이드합니다. 도움이 필요하면 플랫폼 문서를 참조하세요.
  5. cert-manager v1.2.0 이전 버전을 실행하고 있으면 v1.2.0으로 업그레이드해야 합니다.
    1. 다음 명령어를 사용하여 현재 cert-manager 버전을 확인합니다.

      kubectl -n cert-manager get deployment -o yaml | grep 'image:'
      

      다음과 비슷한 결과가 반환됩니다.

      image: quay.io/jetstack/cert-manager-controller:v1.2.0
      image: quay.io/jetstack/cert-manager-cainjector:v1.2.0
      image: quay.io/jetstack/cert-manager-webhook:v1.2.0
      
    2. 다음 명령어를 사용하여 배포를 삭제합니다.
      kubectl delete -n cert-manager deployment cert-manager cert-manager-cainjector cert-manager-webhook
      
    3. 다음 명령어를 사용하여 cert-manager를 v1.2.0 버전으로 업그레이드합니다.
      kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.2.0/cert-manager.yaml
      

ASM을 1.12 버전으로 업그레이드

플랫폼에 적합한 ASM 문서를 사용하여 업그레이드를 수행합니다.

ASM 설치 및 구성 안내는 플랫폼에 따라 다릅니다. 플랫폼은 다음 카테고리로 분류됩니다.

  • GKE: Google Cloud에서 실행되는 Google Kubernetes Engine 클러스터입니다.
  • Google Cloud 외부: 다음 위치에서 실행되는 Anthos 클러스터:
    • VMware용 Anthos 클러스터(GKE On-Prem)
    • 베어메탈용 Anthos
    • Anthos clusters on AWS
    • Amazon EKS
  • 기타 Kubernetes 플랫폼: 다음 제품에서 생성 및 실행되는 규정 준수 클러스터입니다.
    • AKS
    • EKS
    • OpenShift

GKE

하이브리드 설치에서 ASM 버전 1.8.x로 업그레이드하는 순서는 다음과 같습니다.

  1. 업그레이드를 준비합니다.
  2. ASM의 새 버전을 설치합니다.
  3. 현재 설치에서 이전 ASM 버전의 배포, 서비스, 웹훅을 삭제합니다.
  4. 게이트웨이를 업그레이드하고 새 웹훅을 구성합니다.

GKE에 하이브리드용 ASM 버전 1.8.x로 업그레이드하려면 다음 안내를 따르세요.

의 안내를 따르세요.
  1. Anthos Service Mesh 업그레이드의 요구사항을 검토하지만 아직 업그레이드를 수행하지 마세요.
  2. 새 버전을 설치하기 전 현재 버전을 확인합니다. 이전 ASM 버전의 배포, 서비스, 웹훅을 현재 설치에서 삭제하려면 이 정보가 필요합니다. 다음 명령어를 사용하여 현재 istiod 버전을 환경 변수에 저장합니다.
    export DELETE_REV=$(kubectl get deploy -n istio-system -l app=istiod -o jsonpath={.items[].metadata.labels.'istio\.io\/rev'}'{"\n"}')
    echo ${DELETE_REV}
  3. overlay.yaml 파일을 만들거나 기존 overlay.yaml에 다음 콘텐츠가 포함되었는지 확인합니다.
    apiVersion: install.istio.io/v1alpha1
    kind: IstioOperator
    spec:
      revision: asm-1129-3
      components:
        ingressGateways:
          - name: istio-ingressgateway
            enabled: true
            k8s:
              nodeSelector:
                # default node selector, if different or not using node selectors, change accordingly.
                cloud.google.com/gke-nodepool: apigee-runtime
              resources:
                requests:
                  cpu: 1000m
              service:
                type: LoadBalancer
                loadBalancerIP: STATIC_IP # If you do not have a reserved static IP, leave this out.
                ports:
                  - name: http-status-port
                    port: 15021
                  - name: http2
                    port: 80
                    targetPort: 8080
                  - name: https
                    port: 443
                    targetPort: 8443
      meshConfig:
        accessLogFormat:
          '{"start_time":"%START_TIME%","remote_address":"%DOWNSTREAM_DIRECT_REMOTE_ADDRESS%","user_agent":"%REQ(USER-AGENT)%","host":"%REQ(:AUTHORITY)%","request":"%REQ(:METHOD)% %REQ(X-ENVOY-ORIGINAL-PATH?:PATH)% %PROTOCOL%","request_time":"%DURATION%","status":"%RESPONSE_CODE%","status_details":"%RESPONSE_CODE_DETAILS%","bytes_received":"%BYTES_RECEIVED%","bytes_sent":"%BYTES_SENT%","upstream_address":"%UPSTREAM_HOST%","upstream_response_flags":"%RESPONSE_FLAGS%","upstream_response_time":"%RESPONSE_DURATION%","upstream_service_time":"%RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)%","upstream_cluster":"%UPSTREAM_CLUSTER%","x_forwarded_for":"%REQ(X-FORWARDED-FOR)%","request_method":"%REQ(:METHOD)%","request_path":"%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%","request_protocol":"%PROTOCOL%","tls_protocol":"%DOWNSTREAM_TLS_VERSION%","request_id":"%REQ(X-REQUEST-ID)%","sni_host":"%REQUESTED_SERVER_NAME%","apigee_dynamic_data":"%DYNAMIC_METADATA(envoy.lua)%"}'
    
  4. ASM 문서의 다음 섹션에 있는 안내를 따릅니다.
    1. asmcli를 다운로드합니다.
    2. 클러스터에 관리자 권한을 부여합니다.
    3. 프로젝트 및 클러스터를 검증합니다.
    4. 선택적 기능을 사용하여 업그레이드합니다. '게이트웨이 업그레이드 섹션'을 시작하기 전에 중지하세요.
  5. 변형 웹훅 및 유효성 검증 웹훅을 삭제합니다.
    1. asmcli를 설치한 디렉터리로 cd를 이동합니다.
    2. 웹훅 삭제를 위해 스크립트에서 사용할 환경 변수에 현재 새 버전을 저장합니다.
      UPGRADE_REV="asm-1129-3"
    3. 다음 명령어를 포함하는 셸 스크립트를 만듭니다.
      #!/bin/bash
      
      set -ex
      
      PROJECT_ID="YOUR_PROJECT_ID"
      CLUSTER_NAME="YOUR_CLUSTER_NAME"
      CLUSTER_LOCATION="YOUR_CLUSTER_LOCATION"
      
      kubectl label namespace istio-system istio.io/rev=${UPGRADE_REV} istio-injection- --overwrite
      kubectl rollout restart deployment -n istio-system
      kubectl apply -n istio-system -f PATH_TO_INGRESSGATEWAYistio-ingressgateway
      kubectl apply -n istio-system -f PATH_TO_INGRESSGATEWAY/istio-ingressgateway-connectors
      
      if [[ "${DELETE_REV}" != "${UPGRADE_REV}" ]]; then
        kubectl apply -f out/asm/istio/istiod-service.yaml
        kubectl delete deploy -l app=istio-ingressgateway,istio.io/rev=${DELETE_REV} -n istio-system --ignore-not-found=true
        kubectl delete deploy -l app=istio-ingressgateway-connectors,istio.io/rev=${DELETE_REV} -n istio-system --ignore-not-found=true
        kubectl delete ValidatingWebhookConfiguration -l app=istiod,istio.io/rev=${DELETE_REV} -n istio-system --ignore-not-found=true
        kubectl delete MutatingWebhookConfiguration -l app=sidecar-injector,istio.io/rev=${DELETE_REV} -n istio-system --ignore-not-found=true
        kubectl delete Service,Deployment,HorizontalPodAutoscaler,PodDisruptionBudget istiod-${DELETE_REV} -n istio-system --ignore-not-found=true
        kubectl delete IstioOperator installed-state-${DELETE_REV} -n istio-system --ignore-not-found=true
      fi
      
    4. 스크립트를 실행하여 현재 웹훅을 삭제합니다.
  6. 게이트웨이 업그레이드의 단계에 따라 새 웹훅을 만들고 트래픽을 새 게이트웨이로 전환합니다.

Google Cloud 외부

이 안내에서는 ASM 업그레이드에 대해 설명합니다.

  • VMware용 Anthos 클러스터(GKE On-Prem)
  • 베어메탈용 Anthos
  • Anthos clusters on AWS
  • Amazon EKS
의 안내를 따르세요.
  1. Anthos Service Mesh 업그레이드의 요구사항을 검토하지만 아직 업그레이드를 수행하지 마세요.
  2. 새 버전을 설치하기 전 현재 버전을 확인합니다. 현재 ASM 설치에서 검증 웹훅변경 웹훅을 삭제하려면 이 정보가 필요합니다. 다음 명령어를 사용하여 현재 istiod 버전을 환경 변수에 저장합니다.
    export DELETE_REV=$(kubectl get deploy -n istio-system -l app=istiod -o jsonpath={.items[].metadata.labels.'istio\.io\/rev'}'{"\n"}')
    echo ${DELETE_REV}
  3. overlay.yaml 파일을 만들거나 기존 overlay.yaml에 다음 콘텐츠가 포함되었는지 확인합니다.
    apiVersion: install.istio.io/v1alpha1
    kind: IstioOperator
    spec:
      revision: asm-1129-3
      components:
        ingressGateways:
          - name: istio-ingressgateway
            enabled: true
            k8s:
              nodeSelector:
                # default node selector, if different or not using node selectors, change accordingly.
                cloud.google.com/gke-nodepool: apigee-runtime
              resources:
                requests:
                  cpu: 1000m
              service:
                type: LoadBalancer
                loadBalancerIP: STATIC_IP # If you do not have a reserved static IP, leave this out.
                ports:
                  - name: http-status-port
                    port: 15021
                  - name: http2
                    port: 80
                    targetPort: 8080
                  - name: https
                    port: 443
                    targetPort: 8443
      values:
        gateways:
          istio-ingressgateway:
            runAsRoot: true
    
      meshConfig:
        accessLogFormat:
          '{"start_time":"%START_TIME%","remote_address":"%DOWNSTREAM_DIRECT_REMOTE_ADDRESS%","user_agent":"%REQ(USER-AGENT)%","host":"%REQ(:AUTHORITY)%","request":"%REQ(:METHOD)% %REQ(X-ENVOY-ORIGINAL-PATH?:PATH)% %PROTOCOL%","request_time":"%DURATION%","status":"%RESPONSE_CODE%","status_details":"%RESPONSE_CODE_DETAILS%","bytes_received":"%BYTES_RECEIVED%","bytes_sent":"%BYTES_SENT%","upstream_address":"%UPSTREAM_HOST%","upstream_response_flags":"%RESPONSE_FLAGS%","upstream_response_time":"%RESPONSE_DURATION%","upstream_service_time":"%RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)%","upstream_cluster":"%UPSTREAM_CLUSTER%","x_forwarded_for":"%REQ(X-FORWARDED-FOR)%","request_method":"%REQ(:METHOD)%","request_path":"%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%","request_protocol":"%PROTOCOL%","tls_protocol":"%DOWNSTREAM_TLS_VERSION%","request_id":"%REQ(X-REQUEST-ID)%","sni_host":"%REQUESTED_SERVER_NAME%","apigee_dynamic_data":"%DYNAMIC_METADATA(envoy.lua)%"}'
    
  4. ASM 문서의 다음 섹션에 있는 안내를 따릅니다.
    1. asmcli를 다운로드합니다.
    2. 클러스터에 관리자 권한을 부여합니다.
    3. 프로젝트 및 클러스터를 검증합니다.
    4. 선택적 기능을 사용하여 업그레이드합니다. '게이트웨이 업그레이드 섹션'을 시작하기 전에 중지하세요.
  5. 변형 웹훅 및 유효성 검증 웹훅을 삭제합니다.
    1. asmcli를 설치한 디렉터리로 cd를 이동합니다.
    2. 웹훅 삭제를 위해 스크립트에서 사용할 환경 변수에 현재 새 버전을 저장합니다.
      UPGRADE_REV="asm-1129-3"
    3. 다음 명령어를 포함하는 셸 스크립트를 만듭니다.
      #!/bin/bash
      
      set -ex
      
      PROJECT_ID="YOUR_PROJECT_ID"
      CLUSTER_NAME="YOUR_CLUSTER_NAME"
      CLUSTER_LOCATION="YOUR_CLUSTER_LOCATION"
      
      gcloud config configurations activate ${PROJECT_ID}
      gcloud container clusters get-credentials ${CLUSTER_NAME} --region ${CLUSTER_LOCATION} --project ${PROJECT_ID}
      
      kubectl label namespace istio-system istio.io/rev=${UPGRADE_REV} istio-injection- --overwrite
      kubectl rollout restart deployment -n istio-system
      kubectl apply -n istio-system -f PATH_TO_INGRESSGATEWAYistio-ingressgateway
      kubectl apply -n istio-system -f PATH_TO_INGRESSGATEWAY/istio-ingressgateway-connectors
      
      if [[ "${DELETE_REV}" != "${UPGRADE_REV}" ]]; then
        kubectl apply -f out/asm/istio/istiod-service.yaml
        kubectl delete deploy -l app=istio-ingressgateway,istio.io/rev=${DELETE_REV} -n istio-system --ignore-not-found=true
        kubectl delete deploy -l app=istio-ingressgateway-connectors,istio.io/rev=${DELETE_REV} -n istio-system --ignore-not-found=true
        kubectl delete ValidatingWebhookConfiguration -l app=istiod,istio.io/rev=${DELETE_REV} -n istio-system --ignore-not-found=true
        kubectl delete MutatingWebhookConfiguration -l app=sidecar-injector,istio.io/rev=${DELETE_REV} -n istio-system --ignore-not-found=true
        kubectl delete Service,Deployment,HorizontalPodAutoscaler,PodDisruptionBudget istiod-${DELETE_REV} -n istio-system --ignore-not-found=true
        kubectl delete IstioOperator installed-state-${DELETE_REV} -n istio-system --ignore-not-found=true
      fi
      
    4. 스크립트를 실행하여 현재 웹훅을 삭제합니다.
  6. 게이트웨이 업그레이드의 단계에 따라 새 웹훅을 만들고 트래픽을 새 게이트웨이로 전환합니다.

AKS/EKS

이 안내에서 Anthos 연결된 클러스터에서 Anthos Service Mesh(ASM) 버전 istio-1.12.9-asm.3를 업그레이드하는 프로세스는 새로 설치하는 것과 동일합니다.

Anthos Service Mesh 설치 준비

    Linux

  1. Anthos Service Mesh 설치 파일을 현재 작업 디렉터리에 다운로드합니다.
    curl -LO https://storage.googleapis.com/gke-release/asm/istio-1.12.9-asm.3-linux-amd64.tar.gz
  2. 서명 파일을 다운로드하고 openssl을 사용하여 서명을 확인합니다.
    curl -LO https://storage.googleapis.com/gke-release/asm/istio-1.12.9-asm.3-linux-amd64.tar.gz.1.sig
    openssl dgst -verify /dev/stdin -signature istio-1.12.9-asm.3-linux-amd64.tar.gz.1.sig istio-1.12.9-asm.3.tar.gz <<'EOF'
    -----BEGIN PUBLIC KEY-----
    MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEWZrGCUaJJr1H8a36sG4UUoXvlXvZ
    wQfk16sxprI2gOJ2vFFggdq3ixF2h4qNBt0kI7ciDhgpwS8t+/960IsIgw==
    -----END PUBLIC KEY-----
    EOF
    
  3. 원하는 파일 시스템 위치에 파일 콘텐츠 압축을 풉니다. 예를 들어 콘텐츠를 현재 작업 디렉터리에 추출하려면 다음을 사용하세요.
    tar xzf istio-1.12.9-asm.3-linux-amd64.tar.gz

    이 명령어는 다음을 포함하는 현재 작업 디렉터리에 istio-1.12.9-asm.3이라는 설치 디렉터리를 만듭니다.

    • 샘플 애플리케이션은 samples 디렉터리에 있습니다.
    • Anthos Service Mesh를 설치하는 데 사용하는 istioctl 명령줄 도구는 bin 디렉터리에 있습니다.
    • Anthos Service Mesh 구성 프로필은 manifests/profiles 디렉터리에 있습니다.
  4. Anthos Service Mesh 설치 루트 디렉터리에 있는지 확인합니다.
    cd istio-1.12.9-asm.3
  5. 편의를 위해 /bin 디렉터리의 도구를 PATH에 추가합니다.
    export PATH=$PWD/bin:$PATH
  6. MacOS

  7. Anthos Service Mesh 설치 파일을 현재 작업 디렉터리에 다운로드합니다.
    curl -LO https://storage.googleapis.com/gke-release/asm/istio-1.12.9-asm.3-osx.tar.gz
  8. 서명 파일을 다운로드하고 openssl을 사용하여 서명을 확인합니다.
    curl -LO https://storage.googleapis.com/gke-release/asm/istio-1.12.9-asm.3-osx.tar.gz.1.sig
    openssl dgst -sha256 -verify /dev/stdin -signature istio-1.12.9-asm.3-osx.tar.gz.1.sig istio-1.12.9-asm.3.tar.gz <<'EOF'
    -----BEGIN PUBLIC KEY-----
    MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEWZrGCUaJJr1H8a36sG4UUoXvlXvZ
    wQfk16sxprI2gOJ2vFFggdq3ixF2h4qNBt0kI7ciDhgpwS8t+/960IsIgw==
    -----END PUBLIC KEY-----
    EOF
    
  9. 원하는 파일 시스템 위치에 파일 콘텐츠 압축을 풉니다. 예를 들어 콘텐츠를 현재 작업 디렉터리에 추출하려면 다음을 사용하세요.
    tar xzf istio-1.12.9-asm.3-osx.tar.gz

    이 명령어는 다음을 포함하는 현재 작업 디렉터리에 istio-1.12.9-asm.3이라는 설치 디렉터리를 만듭니다.

    • 샘플 애플리케이션은 samples 디렉터리에 있습니다.
    • Anthos Service Mesh를 설치하는 데 사용하는 istioctl 명령줄 도구는 bin 디렉터리에 있습니다.
    • Anthos Service Mesh 구성 프로필은 manifests/profiles 디렉터리에 있습니다.
  10. Anthos Service Mesh 설치 루트 디렉터리에 있는지 확인합니다.
    cd istio-1.12.9-asm.3
  11. 편의를 위해 /bin 디렉터리의 도구를 PATH에 추가합니다.
    export PATH=$PWD/bin:$PATH
  12. Windows

  13. Anthos Service Mesh 설치 파일을 현재 작업 디렉터리에 다운로드합니다.
    curl -LO https://storage.googleapis.com/gke-release/asm/istio-1.12.9-asm.3-win.zip
  14. 서명 파일을 다운로드하고 openssl을 사용하여 서명을 확인합니다.
    curl -LO https://storage.googleapis.com/gke-release/asm/istio-1.12.9-asm.3-win.zip.1.sig
    openssl dgst -verify - -signature istio-1.12.9-asm.3-win.zip.1.sig istio-1.12.9-asm.3.win.zip <<'EOF'
    -----BEGIN PUBLIC KEY-----
    MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEWZrGCUaJJr1H8a36sG4UUoXvlXvZ
    wQfk16sxprI2gOJ2vFFggdq3ixF2h4qNBt0kI7ciDhgpwS8t+/960IsIgw==
    -----END PUBLIC KEY-----
    EOF
    
  15. 원하는 파일 시스템 위치에 파일 콘텐츠 압축을 풉니다. 예를 들어 콘텐츠를 현재 작업 디렉터리에 추출하려면 다음을 사용하세요.
    tar xzf istio-1.12.9-asm.3-win.zip

    이 명령어는 다음을 포함하는 현재 작업 디렉터리에 istio-1.12.9-asm.3이라는 설치 디렉터리를 만듭니다.

    • 샘플 애플리케이션은 samples 디렉터리에 있습니다.
    • Anthos Service Mesh를 설치하는 데 사용하는 istioctl 명령줄 도구는 bin 디렉터리에 있습니다.
    • Anthos Service Mesh 구성 프로필은 manifests\profiles 디렉터리에 있습니다.
  16. Anthos Service Mesh 설치 루트 디렉터리에 있는지 확인합니다.
    cd istio-1.12.9-asm.3
  17. 편의를 위해 \bin 디렉터리의 도구를 PATH에 추가합니다.
    set PATH=%CD%\bin:%PATH%
  18. 이제 ASM Istio가 설치되었으므로 istioctl의 버전을 확인합니다.
    istioctl version
  19. 제어 영역 구성요소에 대해 istio-system이라는 네임스페이스를 만듭니다.
    kubectl create namespace istio-system

유효성 검증 웹훅 구성

Anthos Service Mesh를 설치할 때 istiod에 버전 라벨을 설정합니다. 유효성 검증 웹훅에 동일한 버전을 설정해야 합니다.

  1. 다음 콘텐츠로 istiod-service.yaml이라는 파일을 만듭니다.
    apiVersion: v1
    kind: Service
    metadata:
      name: istiod
      namespace: istio-system
      labels:
        istio.io/rev: asm-1129-3
        app: istiod
        istio: pilot
        release: istio
    spec:
      ports:
        - port: 15010
          name: grpc-xds # plaintext
          protocol: TCP
        - port: 15012
          name: https-dns # mTLS with k8s-signed cert
          protocol: TCP
        - port: 443
          name: https-webhook # validation and injection
          targetPort: 15017
          protocol: TCP
        - port: 15014
          name: http-monitoring # prometheus stats
          protocol: TCP
      selector:
        app: istiod
        istio.io/rev: asm-1129-3
      meshConfig:
        accessLogFormat:
          '{"start_time":"%START_TIME%","remote_address":"%DOWNSTREAM_DIRECT_REMOTE_ADDRESS%","user_agent":"%REQ(USER-AGENT)%","host":"%REQ(:AUTHORITY)%","request":"%REQ(:METHOD)% %REQ(X-ENVOY-ORIGINAL-PATH?:PATH)% %PROTOCOL%","request_time":"%DURATION%","status":"%RESPONSE_CODE%","status_details":"%RESPONSE_CODE_DETAILS%","bytes_received":"%BYTES_RECEIVED%","bytes_sent":"%BYTES_SENT%","upstream_address":"%UPSTREAM_HOST%","upstream_response_flags":"%RESPONSE_FLAGS%","upstream_response_time":"%RESPONSE_DURATION%","upstream_service_time":"%RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)%","upstream_cluster":"%UPSTREAM_CLUSTER%","x_forwarded_for":"%REQ(X-FORWARDED-FOR)%","request_method":"%REQ(:METHOD)%","request_path":"%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%","request_protocol":"%PROTOCOL%","tls_protocol":"%DOWNSTREAM_TLS_VERSION%","request_id":"%REQ(X-REQUEST-ID)%","sni_host":"%REQUESTED_SERVER_NAME%","apigee_dynamic_data":"%DYNAMIC_METADATA(envoy.lua)%"}'
    
  2. kubectl을 사용하여 유효성 검증 웹훅 구성을 적용합니다.
    kubectl apply -f istiod-service.yaml
  3. 구성이 적용되었는지 확인합니다.
    kubectl get svc -n istio-system

    다음과 비슷한 응답이 표시됩니다.

    NAME     TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                                 AGE
    istiod   ClusterIP   172.200.18.133   <none>        15010/TCP,15012/TCP,443/TCP,15014/TCP   22s
    

Anthos Service Mesh 설치

  1. asm-multicloud 프로필을 사용하여 istioctl로 Anthos Service Mesh를 설치합니다.
    istioctl install \
        --set profile=asm-multicloud \
        --set revision="asm-1129-3"

    다음과 비슷한 결과가 출력됩니다.

    kubectl get pods -n istio-system
    NAME                                   READY   STATUS    RESTARTS   AGE
    istio-ingressgateway-88b6fd976-flgp2   1/1     Running   0          3m13s
    istio-ingressgateway-88b6fd976-p5dl9   1/1     Running   0          2m57s
    istiod-asm-1129-3-798ffb964-2ls88       1/1     Running   0          3m21s
    istiod-asm-1129-3-798ffb964-fnj8c       1/1     Running   1          3m21s
    

    --set revision 인수는 istio.io/rev=asm-1129-3 형식의 버전 라벨을 istiod에 추가합니다. 버전 라벨은 자동 사이드카 인젝터 웹훅에서 삽입된 사이드카를 특정 istiod 버전과 연결하는 데 사용됩니다. 네임스페이스에 사이드카 자동 삽입을 사용 설정하려면 istiod의 라벨과 일치하는 버전으로 라벨을 지정해야 합니다.

  2. 설치가 완료되었는지 확인합니다.
    kubectl get svc -n istio-system

    다음과 비슷한 결과가 출력됩니다.

    NAME                   TYPE           CLUSTER-IP       EXTERNAL-IP     PORT(S)                                                                      AGE
    istio-ingressgateway   LoadBalancer   172.200.48.52    34.74.177.168   15021:30479/TCP,80:30030/TCP,443:32200/TCP,15012:32297/TCP,15443:30244/TCP   3m35s
    istiod                 ClusterIP      172.200.18.133   <none>          15010/TCP,15012/TCP,443/TCP,15014/TCP                                        4m46s
    istiod-asm-1129-3       ClusterIP      172.200.63.220   <none>          15010/TCP,15012/TCP,443/TCP,15014/TCP                                        3m43s
    

OpenShift

이 안내에서 Anthos 연결된 클러스터에서 Anthos Service Mesh(ASM) 버전 istio-1.12.9-asm.3를 업그레이드하는 프로세스는 새로 설치하는 것과 동일합니다.

Anthos Service Mesh 설치 준비

    Linux

  1. 다음 OpenShift CLI(oc) 명령어를 사용하여 istio-system에 anyuid SCC(보안 컨텍스트 제약조건)을 부여합니다.
    oc adm policy add-scc-to-group anyuid system:serviceaccounts:istio-system
  2. Anthos Service Mesh 설치 파일을 현재 작업 디렉터리에 다운로드합니다.
    curl -LO https://storage.googleapis.com/gke-release/asm/istio-1.12.9-asm.3-linux-amd64.tar.gz
  3. 서명 파일을 다운로드하고 openssl을 사용하여 서명을 확인합니다.
    curl -LO https://storage.googleapis.com/gke-release/asm/istio-1.12.9-asm.3-linux-amd64.tar.gz.1.sig
    openssl dgst -verify /dev/stdin -signature istio-1.12.9-asm.3-linux-amd64.tar.gz.1.sig istio-1.12.9-asm.3.tar.gz <<'EOF'
    -----BEGIN PUBLIC KEY-----
    MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEWZrGCUaJJr1H8a36sG4UUoXvlXvZ
    wQfk16sxprI2gOJ2vFFggdq3ixF2h4qNBt0kI7ciDhgpwS8t+/960IsIgw==
    -----END PUBLIC KEY-----
    EOF
    
  4. 원하는 파일 시스템 위치에 파일 콘텐츠 압축을 풉니다. 예를 들어 콘텐츠를 현재 작업 디렉터리에 추출하려면 다음을 사용하세요.
    tar xzf istio-1.12.9-asm.3-linux-amd64.tar.gz

    이 명령어는 다음을 포함하는 현재 작업 디렉터리에 istio-1.12.9-asm.3이라는 설치 디렉터리를 만듭니다.

    • 샘플 애플리케이션은 samples 디렉터리에 있습니다.
    • Anthos Service Mesh를 설치하는 데 사용하는 istioctl 명령줄 도구는 bin 디렉터리에 있습니다.
    • Anthos Service Mesh 구성 프로필은 manifests/profiles 디렉터리에 있습니다.
  5. Anthos Service Mesh 설치 루트 디렉터리에 있는지 확인합니다.
    cd istio-1.12.9-asm.3
  6. 편의를 위해 /bin 디렉터리의 도구를 PATH에 추가합니다.
    export PATH=$PWD/bin:$PATH
  7. MacOS

  8. 다음 OpenShift CLI(oc) 명령어를 사용하여 istio-system에 anyuid SCC(보안 컨텍스트 제약조건)을 부여합니다.
    oc adm policy add-scc-to-group anyuid system:serviceaccounts:istio-system
  9. Anthos Service Mesh 설치 파일을 현재 작업 디렉터리에 다운로드합니다.
    curl -LO https://storage.googleapis.com/gke-release/asm/istio-1.12.9-asm.3-osx.tar.gz
  10. 서명 파일을 다운로드하고 openssl을 사용하여 서명을 확인합니다.
    curl -LO https://storage.googleapis.com/gke-release/asm/istio-1.12.9-asm.3-osx.tar.gz.1.sig
    openssl dgst -sha256 -verify /dev/stdin -signature istio-1.12.9-asm.3-osx.tar.gz.1.sig istio-1.12.9-asm.3.tar.gz <<'EOF'
    -----BEGIN PUBLIC KEY-----
    MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEWZrGCUaJJr1H8a36sG4UUoXvlXvZ
    wQfk16sxprI2gOJ2vFFggdq3ixF2h4qNBt0kI7ciDhgpwS8t+/960IsIgw==
    -----END PUBLIC KEY-----
    EOF
    
  11. 원하는 파일 시스템 위치에 파일 콘텐츠 압축을 풉니다. 예를 들어 콘텐츠를 현재 작업 디렉터리에 추출하려면 다음을 사용하세요.
    tar xzf istio-1.12.9-asm.3-osx.tar.gz

    이 명령어는 다음을 포함하는 현재 작업 디렉터리에 istio-1.12.9-asm.3이라는 설치 디렉터리를 만듭니다.

    • 샘플 애플리케이션은 samples 디렉터리에 있습니다.
    • Anthos Service Mesh를 설치하는 데 사용하는 istioctl 명령줄 도구는 bin 디렉터리에 있습니다.
    • Anthos Service Mesh 구성 프로필은 manifests/profiles 디렉터리에 있습니다.
  12. Anthos Service Mesh 설치 루트 디렉터리에 있는지 확인합니다.
    cd istio-1.12.9-asm.3
  13. 편의를 위해 /bin 디렉터리의 도구를 PATH에 추가합니다.
    export PATH=$PWD/bin:$PATH
  14. Windows

  15. 다음 OpenShift CLI(oc) 명령어를 사용하여 istio-system에 anyuid SCC(보안 컨텍스트 제약조건)을 부여합니다.
    oc adm policy add-scc-to-group anyuid system:serviceaccounts:istio-system
  16. Anthos Service Mesh 설치 파일을 현재 작업 디렉터리에 다운로드합니다.
    curl -LO https://storage.googleapis.com/gke-release/asm/istio-1.12.9-asm.3-win.zip
  17. 서명 파일을 다운로드하고 openssl을 사용하여 서명을 확인합니다.
    curl -LO https://storage.googleapis.com/gke-release/asm/istio-1.12.9-asm.3-win.zip.1.sig
    openssl dgst -verify - -signature istio-1.12.9-asm.3-win.zip.1.sig istio-1.12.9-asm.3.win.zip <<'EOF'
    -----BEGIN PUBLIC KEY-----
    MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEWZrGCUaJJr1H8a36sG4UUoXvlXvZ
    wQfk16sxprI2gOJ2vFFggdq3ixF2h4qNBt0kI7ciDhgpwS8t+/960IsIgw==
    -----END PUBLIC KEY-----
    EOF
    
  18. 원하는 파일 시스템 위치에 파일 콘텐츠 압축을 풉니다. 예를 들어 콘텐츠를 현재 작업 디렉터리에 추출하려면 다음을 사용하세요.
    tar xzf istio-1.12.9-asm.3-win.zip

    이 명령어는 다음을 포함하는 현재 작업 디렉터리에 istio-1.12.9-asm.3이라는 설치 디렉터리를 만듭니다.

    • 샘플 애플리케이션은 samples 디렉터리에 있습니다.
    • Anthos Service Mesh를 설치하는 데 사용하는 istioctl 명령줄 도구는 bin 디렉터리에 있습니다.
    • Anthos Service Mesh 구성 프로필은 manifests\profiles 디렉터리에 있습니다.
  19. Anthos Service Mesh 설치 루트 디렉터리에 있는지 확인합니다.
    cd istio-1.12.9-asm.3
  20. 편의를 위해 \bin 디렉터리의 도구를 PATH에 추가합니다.
    set PATH=%CD%\bin:%PATH%
  21. 이제 ASM Istio가 설치되었으므로 istioctl의 버전을 확인합니다.
    istioctl version
  22. 제어 영역 구성요소에 대해 istio-system이라는 네임스페이스를 만듭니다.
    kubectl create namespace istio-system

유효성 검증 웹훅 구성

Anthos Service Mesh를 설치할 때 istiod에 버전 라벨을 설정합니다. 유효성 검증 웹훅에 동일한 버전을 설정해야 합니다.

  1. 다음 콘텐츠로 istiod-service.yaml이라는 파일을 만듭니다.
    apiVersion: v1
    kind: Service
    metadata:
      name: istiod
      namespace: istio-system
      labels:
        istio.io/rev: asm-1129-3
        app: istiod
        istio: pilot
        release: istio
    spec:
      ports:
        - port: 15010
          name: grpc-xds # plaintext
          protocol: TCP
        - port: 15012
          name: https-dns # mTLS with k8s-signed cert
          protocol: TCP
        - port: 443
          name: https-webhook # validation and injection
          targetPort: 15017
          protocol: TCP
        - port: 15014
          name: http-monitoring # prometheus stats
          protocol: TCP
      selector:
        app: istiod
        istio.io/rev: asm-1129-3
      meshConfig:
        accessLogFormat:
          '{"start_time":"%START_TIME%","remote_address":"%DOWNSTREAM_DIRECT_REMOTE_ADDRESS%","user_agent":"%REQ(USER-AGENT)%","host":"%REQ(:AUTHORITY)%","request":"%REQ(:METHOD)% %REQ(X-ENVOY-ORIGINAL-PATH?:PATH)% %PROTOCOL%","request_time":"%DURATION%","status":"%RESPONSE_CODE%","status_details":"%RESPONSE_CODE_DETAILS%","bytes_received":"%BYTES_RECEIVED%","bytes_sent":"%BYTES_SENT%","upstream_address":"%UPSTREAM_HOST%","upstream_response_flags":"%RESPONSE_FLAGS%","upstream_response_time":"%RESPONSE_DURATION%","upstream_service_time":"%RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)%","upstream_cluster":"%UPSTREAM_CLUSTER%","x_forwarded_for":"%REQ(X-FORWARDED-FOR)%","request_method":"%REQ(:METHOD)%","request_path":"%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%","request_protocol":"%PROTOCOL%","tls_protocol":"%DOWNSTREAM_TLS_VERSION%","request_id":"%REQ(X-REQUEST-ID)%","sni_host":"%REQUESTED_SERVER_NAME%","apigee_dynamic_data":"%DYNAMIC_METADATA(envoy.lua)%"}'
    
  2. kubectl을 사용하여 유효성 검증 웹훅 구성을 적용합니다.
    kubectl apply -f istiod-service.yaml
  3. 구성이 적용되었는지 확인합니다.
    kubectl get svc -n istio-system

    다음과 비슷한 응답이 표시됩니다.

    NAME     TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                                 AGE
    istiod   ClusterIP   172.200.18.133   <none>        15010/TCP,15012/TCP,443/TCP,15014/TCP   22s
    

Anthos Service Mesh 설치

  1. asm-multicloud 프로필을 사용하여 istioctl로 Anthos Service Mesh를 설치합니다.
    istioctl install \
        --set profile=asm-multicloud \
        --set revision=istio-1.12.9-asm.3

    다음과 비슷한 결과가 출력됩니다.

    kubectl get pods -n istio-system
    NAME                                   READY   STATUS    RESTARTS   AGE
    istio-ingressgateway-88b6fd976-flgp2   1/1     Running   0          3m13s
    istio-ingressgateway-88b6fd976-p5dl9   1/1     Running   0          2m57s
    istiod-asm-1129-3-798ffb964-2ls88       1/1     Running   0          3m21s
    istiod-asm-1129-3-798ffb964-fnj8c       1/1     Running   1          3m21s
    

    --set revision 인수는 istio.io/rev=1.8.6-asm.1 형식의 버전 라벨을 istiod에 추가합니다. 버전 라벨은 자동 사이드카 인젝터 웹훅에서 삽입된 사이드카를 특정 istiod 버전과 연결하는 데 사용됩니다. 네임스페이스에 사이드카 자동 삽입을 사용 설정하려면 istiod의 라벨과 일치하는 버전으로 라벨을 지정해야 합니다.

  2. 설치가 완료되었는지 확인합니다.
    kubectl get svc -n istio-system

    다음과 비슷한 결과가 출력됩니다.

    NAME                   TYPE           CLUSTER-IP       EXTERNAL-IP     PORT(S)                                                                      AGE
    istio-ingressgateway   LoadBalancer   172.200.48.52    34.74.177.168   15021:30479/TCP,80:30030/TCP,443:32200/TCP,15012:32297/TCP,15443:30244/TCP   3m35s
    istiod                 ClusterIP      172.200.18.133   <none>          15010/TCP,15012/TCP,443/TCP,15014/TCP                                        4m46s
    istiod-asm-1129-3       ClusterIP      172.200.63.220   <none>          15010/TCP,15012/TCP,443/TCP,15014/TCP                                        3m43s
    

Hybrid 1.5.10 런타임 설치

  1. 사용 중인 운영체제에 해당하는 출시 패키지를 다운로드합니다.

    Mac 64비트:

    curl -LO \
        https://storage.googleapis.com/apigee-release/hybrid/apigee-hybrid-setup/1.5.10/apigeectl_mac_64.tar.gz

    Linux 64비트:

    curl -LO \
        https://storage.googleapis.com/apigee-release/hybrid/apigee-hybrid-setup/1.5.10/apigeectl_linux_64.tar.gz

    Mac 32비트:

    curl -LO \
        https://storage.googleapis.com/apigee-release/hybrid/apigee-hybrid-setup/1.5.10/apigeectl_mac_32.tar.gz

    Linux 32비트:

    curl -LO \
        https://storage.googleapis.com/apigee-release/hybrid/apigee-hybrid-setup/1.5.10/apigeectl_linux_32.tar.gz
  2. 현재 apigeectl/ 디렉터리의 이름을 백업 디렉터리 이름으로 바꿉니다. 예를 들면 다음과 같습니다.
    mv $APIGEECTL_HOME/ $APIGEECTL_HOME-v1.2/ 
  3. 다운로드한 gzip 파일 콘텐츠를 Hybrid 기본 디렉터리에 추출합니다. 예를 들면 다음과 같습니다.

    tar xvzf FILENAME.tar.gz -C HYBRID_BASE_DIRECTORY
  4. cd 명령어를 사용하여 기본 디렉터리로 이동합니다.
  5. tar 콘텐츠는 기본적으로 이름에 해당 버전과 플랫폼이 포함된 디렉터리로 확장됩니다(예: ./apigeectl_1.5.0-d591b23_linux_64). 이 디렉터리의 이름을 apigeectl로 바꿉니다.

    mv apigeectl_1.5.0-d591b23_linux_64 apigeectl
  6. apigeectl/ 디렉터리에서 apigeectl init, apigeectl apply, apigeectl check-ready를 실행합니다.
    1. Hybrid 1.5.10을 초기화합니다.
      apigeectl init -f OVERRIDES.yaml

      여기서 OVERRIDES.yaml은 수정된 overrides.yaml 파일입니다.

    2. 다음 명령어를 사용하여 올바르게 초기화되었는지 확인합니다.
      apigeectl check-ready -f OVERRIDES.yaml
      kubectl describe apigeeds -n apigee

      다음과 비슷한 결과가 출력됩니다.

      Status:
        Cassandra Data Replication:
        Cassandra Pod Ips:
          10.8.2.204
        Cassandra Ready Replicas:  1
        Components:
          Cassandra:
            Last Successfully Released Version:
              Revision:  v1-f8aa9a82b9f69613
              Version:   v1
            Replicas:
              Available:  1
              Ready:      1
              Total:      1
              Updated:    1
            State:        running
        Scaling:
          In Progress:         false
          Operation:
          Requested Replicas:  0
        State:                 running
      
    3. apigeectl --dry-run 플래그의 구문은 실행 중인 kubectl 버전에 따라 다릅니다. kubectl의 버전을 확인합니다.
      gcloud version
    4. 사용 중인 kubectl 버전에 적절한 명령어로 다음 테스트 실행 오류가 있는지 확인합니다.

      kubectl 버전 1.17 이하:

      apigeectl apply -f OVERRIDES.yaml --dry-run=true

      kubectl 버전 1.18 이상:

      apigeectl apply -f OVERRIDES.yaml --dry-run=client
    5. 재정의를 적용합니다. 설치에 따라 프로덕션 환경 또는 데모/실험용 환경의 안내를 선택하여 따릅니다.

      프로덕션

      프로덕션 환경의 경우 각 하이브리드 구성요소를 개별적으로 업그레이드하고 다음 구성요소로 진행하기 전에 업그레이드된 구성요소의 상태를 확인해야 합니다.

      1. 재정의를 적용하여 Cassandra를 업그레이드합니다.
        apigeectl apply -f OVERRIDES.yaml --datastore
      2. 완료를 확인합니다.
        apigeectl check-ready -f OVERRIDES.yaml

        포드가 준비된 경우에만 다음 단계로 진행합니다.

      3. 재정의를 적용하여 원격 분석 구성요소를 업그레이드하고 완료를 확인합니다.
        apigeectl apply -f OVERRIDES.yaml --telemetry
        apigeectl check-ready -f OVERRIDES.yaml
      4. Redis 구성 요소를 가져옵니다:
        apigeectl apply -f OVERRIDES.yaml --redis
      5. 재정의를 적용하여 조직 수준 구성요소(MART, Watcher, Apigee Connect)를 업그레이드하고 완료를 확인합니다.
        apigeectl apply -f OVERRIDES.yaml --org
        apigeectl check-ready -f OVERRIDES.yaml
      6. 재정의를 적용하여 환경을 업그레이드합니다. 다음 두 가지 중에서 선택할 수 있습니다.
        • 환경별 환경: 한 번에 하나의 환경에 재정의를 적용하고 완료를 확인합니다. 환경마다 이 단계를 반복합니다.
          apigeectl apply -f OVERRIDES.yaml --env ENV_NAME
          apigeectl check-ready -f OVERRIDES.yaml

          여기서 ENV_NAME은 업그레이드하는 환경의 이름입니다.

        • 한 번에 모든 환경: 한 번에 모든 환경에 재정의를 적용하고 완료 여부를 확인합니다.
          apigeectl apply -f OVERRIDES.yaml --all-envs
          apigeectl check-ready -f OVERRIDES.yaml

      데모/실험용

      대부분의 데모 또는 실험용 환경에서는 모든 구성요소에 재정의를 한 번에 적용할 수 있습니다. 데모/실험용 환경의 규모가 크고 복잡하거나 프로덕션 환경을 비슷하게 모방하는 경우 프로덕션 환경 업그레이드 안내를 참조하세요.

      1. apigeectl apply -f OVERRIDES.yaml
      2. 상태를 파악합니다.
        apigeectl check-ready -f OVERRIDES.yaml

업그레이드 롤백

이전 업그레이드를 롤백하려면 다음 단계를 따르세요.

  1. 하이브리드 런타임 네임스페이스의 완료된 작업을 삭제합니다. 여기서 NAMESPACE는 재정의 파일에 지정된 네임스페이스(네임스페이스가 지정된 경우)입니다. 그렇지 않은 경우 기본 네임스페이스는 apigee입니다.
    kubectl delete job -n NAMESPACE \
      $(kubectl get job -n NAMESPACE \
      -o=jsonpath='{.items[?(@.status.succeeded==1)].metadata.name}')
  2. apigee-system 네임스페이스에 대해 완료된 작업을 삭제합니다.
    kubectl delete job -n apigee-system \
      $(kubectl get job -n apigee-system \
      -o=jsonpath='{.items[?(@.status.succeeded==1)].metadata.name}')
  3. apigeectl의 이전 버전이 포함된 디렉터리를 가리키도록 APIGEECTL_HOME 변수를 변경합니다. 예를 들면 다음과 같습니다.
    export APIGEECTL_HOME=PATH_TO_PREVIOUS_APIGEECTL_DIRECTORY
  4. 롤백하려는 설치의 루트 디렉터리에서 apigeectl apply를 실행하고 포드 상태를 확인하고 Redis 구성요소를 삭제(Hybrid v1.5.0의 새로운 기능)한 후 apigeectl init를 실행합니다. 롤백하려는 버전에 원래 재정의 파일을 사용해야 합니다.
    • apigeectl apply을 실행합니다.
      $APIGEECTL_HOME/apigeectl apply -f overrides/ORIGINAL_OVERRIDES.yaml
    • 포트의 상태를 확인합니다.
      kubectl -n NAMESPACE get pods

      여기서 NAMESPACE는 Apigee Hybrid 네임스페이스입니다.

      apigeeds 포드가 실행 중인 경우에만 다음 단계를 진행합니다.

    • Redis는 하이브리드 v1.5의 새로운 구성요소이므로 삭제하려면 다음 명령어를 실행합니다.

      apigeectl_1.5.0 delete --redis -f ORIGINAL_OVERRIDES.yaml
    • apigeectl init을 실행합니다.
      $APIGEECTL_HOME/apigeectl init -f overrides/ORIGINAL_OVERRIDES.yaml