버전 1.5.10으로 업그레이드 개요
Apigee Hybrid 업그레이드 절차는 다음과 같은 섹션으로 정리됩니다.
- 하이브리드 설치를 백업합니다.
- Kubernetes 버전을 확인하고 올바르게 업그레이드합니다.
- ASM을 업그레이드합니다.
- Hybrid 런타임 버전 1.5 설치
기본 요건
- Apigee Hybrid 버전 1.4 이전 버전에서 업데이트하는 경우 Apigee Hybrid를 버전 1.4로 업그레이드에 대한 안내를 참조하세요.
버전 1.5로 업그레이드
- 이 안내에서는
apigeectl
을 설치한 파일 시스템에서 디렉터리의 환경 변수 APIGEECTL_HOME을 사용합니다. 필요한 경우apigeectl
디렉터리로cd
하고 다음 명령어를 사용하여 변수를 정의합니다.export APIGEECTL_HOME=$PWD
echo $APIGEECTL_HOME
export APIGEECTL_HOME=$PWD
echo $APIGEECTL_HOME
set APIGEECTL_HOME=%CD%
echo %APIGEECTL_HOME%
- (권장사항) 버전 1.4
$APIGEECTL_HOME/
디렉터리의 백업 사본을 만듭니다. 예를 들면 다음과 같습니다.tar -czvf $APIGEECTL_HOME/../apigeectl-v1.4-backup.tar.gz $APIGEECTL_HOME
- (권장사항) Cassandra 백업 및 복구의 안내에 따라 Cassandra 데이터베이스를 백업합니다.
- Kubernetes 플랫폼을 Hybrid 1.5에서 지원되는 버전으로 업그레이드합니다.
도움이 필요하면 플랫폼 문서를 참조하세요.
클릭하여 지원되는 플랫폼 목록 펼치기
Apigee hybrid 버전 플랫폼
1.5 1.6 Anthos(3)(Google Cloud) 1.18.x
1.19.x1.19.x
1.20.x
1.21.xAnthos(3)(AWS) 1.6.x
1.7.x
1.8.x(1)1.7.x
1.8.x(1)
1.9.3+
1.10.xAnthos(3)(Azure) 해당 사항 없음 1.8.x Anthos(3)(온프레미스 - VMware) 1.6.x
1.7.x
1.8.x(1)1.7.x
1.8.x(1)
1.9.3+
1.10.xAnthos(3)(베어메탈) 1.6.x
1.7.x1.7.x
1.8.2+
1.9.3+
1.10.xAnthos(3)(연결된 클러스터 - 멀티 클라우드)
Kubernetes 버전(EKS)1.18.x
1.19.x1.19.x
1.20.x
1.21.xAnthos(3)(연결된 클러스터 - 멀티 클라우드)
Kubernetes 버전(AKS)1.18.x
1.19.x1.19.x
1.20.x
1.21.xAnthos(3)(연결된 클러스터 - 멀티 클라우드)
OpenShift 버전4.5
4.6
4.74.6
4.7
4.8Anthos(3)(연결된 클러스터 - 멀티 클라우드)
Konvoy 버전1.7.x 1.7.x 구성요소
1.5 1.6 Anthos Service Mesh(ASM)(2) 1.7.x
1.8.x
1.9.x
1.12.x(버전 1.5.9로 시작하는 Apigee Hybrid 1.5)1.9.x
1.10.x
1.12.x(Apigee Hybrid 버전 1.6.6 이상)JDK JDK 11 JDK 11 cert-manager 1.2.0 1.2.0
1.5.4Cassandra 3.11.6 3.11.6 (1) 버전 1.8.2 이상의 경우 1.8.2 이상으로 업그레이드할 때 cert-manager와 충돌 문서의 안내를 따르세요.
(2) ASM의 지원되는 버전만 설치합니다.
(3)Anthos의 지원되는 버전만 설치합니다.
cert-manager
v1.2.0 이전 버전을 실행하고 있으면 v1.2.0으로 업그레이드해야 합니다.-
다음 명령어를 사용하여 현재
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
-
다음 명령어를 사용하여 배포를 삭제합니다.
kubectl delete -n cert-manager deployment cert-manager cert-manager-cainjector cert-manager-webhook
-
다음 명령어를 사용하여
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
- AWS용 Anthos 클러스터
- Amazon EKS
- 기타 Kubernetes 플랫폼: 다음 제품에서 생성 및 실행되는 규정 준수 클러스터입니다.
- AKS
- EKS
- OpenShift
하이브리드 설치에서 ASM 버전 1.8.x로 업그레이드하는 순서는 다음과 같습니다.
- 업그레이드를 준비합니다.
- ASM의 새 버전을 설치합니다.
- 현재 설치에서 이전 ASM 버전의 배포, 서비스, 웹훅을 삭제합니다.
- 게이트웨이를 업그레이드하고 새 웹훅을 구성합니다.
GKE에 하이브리드용 ASM 버전 1.8.x로 업그레이드하려면 다음 안내를 따르세요.
의 안내를 따르세요.- Anthos Service Mesh 업그레이드의 요구사항을 검토하지만 아직 업그레이드를 수행하지 마세요.
- 새 버전을 설치하기 전 현재 버전을 확인합니다. 이전 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}
- 새
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)%"}' - ASM 문서의 다음 섹션에 있는 안내를 따릅니다.
- asmcli를 다운로드합니다.
- 클러스터에 관리자 권한을 부여합니다.
- 프로젝트 및 클러스터를 검증합니다.
- 선택적 기능을 사용하여 업그레이드합니다. '게이트웨이 업그레이드 섹션'을 시작하기 전에 중지하세요.
- 변형 웹훅 및 유효성 검증 웹훅을 삭제합니다.
asmcli
를 설치한 디렉터리로cd
를 이동합니다.- 웹훅 삭제를 위해 스크립트에서 사용할 환경 변수에 현재 새 버전을 저장합니다.
UPGRADE_REV="asm-1129-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 -fPATH_TO_INGRESSGATEWAY istio-ingressgateway kubectl apply -n istio-system -fPATH_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 - 스크립트를 실행하여 현재 웹훅을 삭제합니다.
- 게이트웨이 업그레이드의 단계에 따라 새 웹훅을 만들고 트래픽을 새 게이트웨이로 전환합니다.
이 안내에서는 ASM 업그레이드에 대해 설명합니다.
- VMware용 Anthos 클러스터(GKE On-Prem)
- 베어메탈용 Anthos
- AWS용 Anthos 클러스터
- Amazon EKS
- Anthos Service Mesh 업그레이드의 요구사항을 검토하지만 아직 업그레이드를 수행하지 마세요.
- 새 버전을 설치하기 전 현재 버전을 확인합니다. 현재 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}
- 새
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)%"}' - ASM 문서의 다음 섹션에 있는 안내를 따릅니다.
- asmcli를 다운로드합니다.
- 클러스터에 관리자 권한을 부여합니다.
- 프로젝트 및 클러스터를 검증합니다.
- 선택적 기능을 사용하여 업그레이드합니다. '게이트웨이 업그레이드 섹션'을 시작하기 전에 중지하세요.
- 변형 웹훅 및 유효성 검증 웹훅을 삭제합니다.
asmcli
를 설치한 디렉터리로cd
를 이동합니다.- 웹훅 삭제를 위해 스크립트에서 사용할 환경 변수에 현재 새 버전을 저장합니다.
UPGRADE_REV="asm-1129-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 -fPATH_TO_INGRESSGATEWAY istio-ingressgateway kubectl apply -n istio-system -fPATH_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 - 스크립트를 실행하여 현재 웹훅을 삭제합니다.
- 게이트웨이 업그레이드의 단계에 따라 새 웹훅을 만들고 트래픽을 새 게이트웨이로 전환합니다.
이 안내에서 Anthos가 연결된 클러스터에서 Anthos Service Mesh(ASM) 버전 istio-1.12.9-asm.3 를 업그레이드하는 프로세스는 새로 설치하는 프로세스와 동일합니다.
Anthos Service Mesh 설치 준비
- Anthos Service Mesh 설치 파일을 현재 작업 디렉터리에 다운로드합니다.
curl -LO https://storage.googleapis.com/gke-release/asm/istio-1.12.9-asm.3-linux-amd64.tar.gz
- 서명 파일을 다운로드하고 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 - 원하는 파일 시스템 위치에 파일 콘텐츠 압축을 풉니다. 예를 들어 콘텐츠를 현재 작업 디렉터리에 추출하려면 다음을 사용하세요.
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
디렉터리에 있습니다.
- 샘플 애플리케이션은
- Anthos Service Mesh 설치 루트 디렉터리에 있는지 확인합니다.
cd istio-1.12.9-asm.3
- 편의를 위해 /bin 디렉터리의 도구를 PATH에 추가합니다.
export PATH=$PWD/bin:$PATH
- Anthos Service Mesh 설치 파일을 현재 작업 디렉터리에 다운로드합니다.
curl -LO https://storage.googleapis.com/gke-release/asm/istio-1.12.9-asm.3-osx.tar.gz
- 서명 파일을 다운로드하고 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 - 원하는 파일 시스템 위치에 파일 콘텐츠 압축을 풉니다. 예를 들어 콘텐츠를 현재 작업 디렉터리에 추출하려면 다음을 사용하세요.
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
디렉터리에 있습니다.
- 샘플 애플리케이션은
- Anthos Service Mesh 설치 루트 디렉터리에 있는지 확인합니다.
cd istio-1.12.9-asm.3
- 편의를 위해 /bin 디렉터리의 도구를 PATH에 추가합니다.
export PATH=$PWD/bin:$PATH
- Anthos Service Mesh 설치 파일을 현재 작업 디렉터리에 다운로드합니다.
curl -LO https://storage.googleapis.com/gke-release/asm/istio-1.12.9-asm.3-win.zip
- 서명 파일을 다운로드하고 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 - 원하는 파일 시스템 위치에 파일 콘텐츠 압축을 풉니다. 예를 들어 콘텐츠를 현재 작업 디렉터리에 추출하려면 다음을 사용하세요.
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
디렉터리에 있습니다.
- 샘플 애플리케이션은
- Anthos Service Mesh 설치 루트 디렉터리에 있는지 확인합니다.
cd istio-1.12.9-asm.3
- 편의를 위해 \bin 디렉터리의 도구를 PATH에 추가합니다.
set PATH=%CD%\bin:%PATH%
- 이제 ASM Istio가 설치되었으므로
istioctl
의 버전을 확인합니다.istioctl version
- 컨트롤 플레인 구성요소에 대해 istio-system이라는 네임스페이스를 만듭니다.
kubectl create namespace istio-system
유효성 검증 웹훅 구성
Anthos Service Mesh를 설치할 때 istiod에 버전 라벨을 설정합니다. 유효성 검증 웹훅에 동일한 버전을 설정해야 합니다.
- 다음 콘텐츠로
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)%"}'
kubectl
을 사용하여 유효성 검증 웹훅 구성을 적용합니다.kubectl apply -f istiod-service.yaml
- 구성이 적용되었는지 확인합니다.
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 설치
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의 라벨과 일치하는 버전으로 라벨을 지정해야 합니다.- 설치가 완료되었는지 확인합니다.
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
이 안내에서 Anthos가 연결된 클러스터에서 Anthos Service Mesh(ASM) 버전 istio-1.12.9-asm.3 를 업그레이드하는 프로세스는 새로 설치하는 프로세스와 동일합니다.
Anthos Service Mesh 설치 준비
- 다음 OpenShift CLI(
oc
) 명령어를 사용하여 istio-system에anyuid
SCC(보안 컨텍스트 제약조건)을 부여합니다.oc adm policy add-scc-to-group anyuid system:serviceaccounts:istio-system
- Anthos Service Mesh 설치 파일을 현재 작업 디렉터리에 다운로드합니다.
curl -LO https://storage.googleapis.com/gke-release/asm/istio-1.12.9-asm.3-linux-amd64.tar.gz
- 서명 파일을 다운로드하고 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 - 원하는 파일 시스템 위치에 파일 콘텐츠 압축을 풉니다. 예를 들어 콘텐츠를 현재 작업 디렉터리에 추출하려면 다음을 사용하세요.
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
디렉터리에 있습니다.
- 샘플 애플리케이션은
- Anthos Service Mesh 설치 루트 디렉터리에 있는지 확인합니다.
cd istio-1.12.9-asm.3
- 편의를 위해 /bin 디렉터리의 도구를 PATH에 추가합니다.
export PATH=$PWD/bin:$PATH
- 다음 OpenShift CLI(
oc
) 명령어를 사용하여 istio-system에anyuid
SCC(보안 컨텍스트 제약조건)을 부여합니다.oc adm policy add-scc-to-group anyuid system:serviceaccounts:istio-system
- Anthos Service Mesh 설치 파일을 현재 작업 디렉터리에 다운로드합니다.
curl -LO https://storage.googleapis.com/gke-release/asm/istio-1.12.9-asm.3-osx.tar.gz
- 서명 파일을 다운로드하고 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 - 원하는 파일 시스템 위치에 파일 콘텐츠 압축을 풉니다. 예를 들어 콘텐츠를 현재 작업 디렉터리에 추출하려면 다음을 사용하세요.
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
디렉터리에 있습니다.
- 샘플 애플리케이션은
- Anthos Service Mesh 설치 루트 디렉터리에 있는지 확인합니다.
cd istio-1.12.9-asm.3
- 편의를 위해 /bin 디렉터리의 도구를 PATH에 추가합니다.
export PATH=$PWD/bin:$PATH
- 다음 OpenShift CLI(
oc
) 명령어를 사용하여 istio-system에anyuid
SCC(보안 컨텍스트 제약조건)을 부여합니다.oc adm policy add-scc-to-group anyuid system:serviceaccounts:istio-system
- Anthos Service Mesh 설치 파일을 현재 작업 디렉터리에 다운로드합니다.
curl -LO https://storage.googleapis.com/gke-release/asm/istio-1.12.9-asm.3-win.zip
- 서명 파일을 다운로드하고 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 - 원하는 파일 시스템 위치에 파일 콘텐츠 압축을 풉니다. 예를 들어 콘텐츠를 현재 작업 디렉터리에 추출하려면 다음을 사용하세요.
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
디렉터리에 있습니다.
- 샘플 애플리케이션은
- Anthos Service Mesh 설치 루트 디렉터리에 있는지 확인합니다.
cd istio-1.12.9-asm.3
- 편의를 위해 \bin 디렉터리의 도구를 PATH에 추가합니다.
set PATH=%CD%\bin:%PATH%
- 이제 ASM Istio가 설치되었으므로
istioctl
의 버전을 확인합니다.istioctl version
- 컨트롤 플레인 구성요소에 대해 istio-system이라는 네임스페이스를 만듭니다.
kubectl create namespace istio-system
유효성 검증 웹훅 구성
Anthos Service Mesh를 설치할 때 istiod에 버전 라벨을 설정합니다. 유효성 검증 웹훅에 동일한 버전을 설정해야 합니다.
- 다음 콘텐츠로
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)%"}'
kubectl
을 사용하여 유효성 검증 웹훅 구성을 적용합니다.kubectl apply -f istiod-service.yaml
- 구성이 적용되었는지 확인합니다.
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 설치
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의 라벨과 일치하는 버전으로 라벨을 지정해야 합니다.- 설치가 완료되었는지 확인합니다.
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 런타임 설치
사용 중인 운영체제에 해당하는 출시 패키지를 다운로드합니다.
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
- 현재
apigeectl/
디렉터리의 이름을 백업 디렉터리 이름으로 바꿉니다. 예를 들면 다음과 같습니다.mv $APIGEECTL_HOME/ $APIGEECTL_HOME-v1.2/
-
다운로드한 gzip 파일 콘텐츠를 Hybrid 기본 디렉터리에 추출합니다. 예를 들면 다음과 같습니다.
tar xvzf
FILENAME .tar.gz -CHYBRID_BASE_DIRECTORY cd
명령어를 사용하여 기본 디렉터리로 이동합니다.-
tar 콘텐츠는 기본적으로 이름에 해당 버전과 플랫폼이 포함된 디렉터리로 확장됩니다(예:
./apigeectl_1.5.0-d591b23_linux_64
). 이 디렉터리의 이름을apigeectl
로 바꿉니다.mv
apigeectl_1.5.0-d591b23_linux_64 apigeectl - 새
apigeectl/
디렉터리에서apigeectl init
,apigeectl apply
,apigeectl check-ready
를 실행합니다.- Hybrid 1.5.10을 초기화합니다.
apigeectl init -f
OVERRIDES .yaml
여기서 OVERRIDES
.yaml
은 수정된overrides.yaml
파일입니다. - 다음 명령어를 사용하여 올바르게 초기화되었는지 확인합니다.
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
apigeectl
--dry-run
플래그의 문법은 실행 중인kubectl
버전에 따라 다릅니다.kubectl
의 버전을 확인합니다.gcloud version
- 사용 중인
kubectl
버전에 적절한 명령어로 다음 테스트 실행 오류가 있는지 확인합니다.kubectl
버전 1.17 이하:apigeectl apply -f
OVERRIDES .yaml
--dry-run=truekubectl
버전 1.18 이상:apigeectl apply -f
OVERRIDES .yaml
--dry-run=client - 재정의를 적용합니다. 설치에 따라 프로덕션 환경 또는 데모/실험용 환경의 안내를 선택하여 따릅니다.
프로덕션 환경의 경우 각 하이브리드 구성요소를 개별적으로 업그레이드하고 다음 구성요소로 진행하기 전에 업그레이드된 구성요소의 상태를 확인해야 합니다.
- 재정의를 적용하여 Cassandra를 업그레이드합니다.
apigeectl apply -f
OVERRIDES .yaml
--datastore - 완료를 확인합니다.
apigeectl check-ready -f
OVERRIDES .yaml
포드가 준비된 경우에만 다음 단계로 진행합니다.
- 재정의를 적용하여 원격 분석 구성요소를 업그레이드하고 완료를 확인합니다.
apigeectl apply -f
OVERRIDES .yaml
--telemetryapigeectl check-ready -f
OVERRIDES .yaml
- Redis 구성 요소를 가져옵니다:
apigeectl apply -f
OVERRIDES .yaml
--redis - 재정의를 적용하여 조직 수준 구성요소(MART, Watcher, Apigee Connect)를 업그레이드하고 완료를 확인합니다.
apigeectl apply -f
OVERRIDES .yaml
--orgapigeectl check-ready -f
OVERRIDES .yaml
- 재정의를 적용하여 환경을 업그레이드합니다. 다음 두 가지 중에서 선택할 수 있습니다.
- 환경별 환경: 한 번에 하나의 환경에 재정의를 적용하고 완료를 확인합니다. 환경마다 이 단계를 반복합니다.
apigeectl apply -f
OVERRIDES .yaml
--envENV_NAME apigeectl check-ready -f
OVERRIDES .yaml
여기서 ENV_NAME은 업그레이드하는 환경의 이름입니다.
- 한 번에 모든 환경: 한 번에 모든 환경에 재정의를 적용하고 완료 여부를 확인합니다.
apigeectl apply -f
OVERRIDES .yaml
--all-envsapigeectl check-ready -f
OVERRIDES .yaml
- 환경별 환경: 한 번에 하나의 환경에 재정의를 적용하고 완료를 확인합니다. 환경마다 이 단계를 반복합니다.
대부분의 데모 또는 실험용 환경에서는 모든 구성요소에 재정의를 한 번에 적용할 수 있습니다. 데모/실험용 환경의 규모가 크고 복잡하거나 프로덕션 환경을 비슷하게 모방하는 경우 프로덕션 환경 업그레이드 안내를 참조하세요.
apigeectl apply -f
OVERRIDES .yaml
- 상태를 파악합니다.
apigeectl check-ready -f
OVERRIDES .yaml
- 재정의를 적용하여 Cassandra를 업그레이드합니다.
- Hybrid 1.5.10을 초기화합니다.
업그레이드 롤백
이전 업그레이드를 롤백하려면 다음 단계를 따르세요.
- 하이브리드 런타임 네임스페이스의 완료된 작업을 삭제합니다. 여기서 NAMESPACE는 재정의 파일에 지정된 네임스페이스(네임스페이스가 지정된 경우)입니다. 그렇지 않은 경우 기본 네임스페이스는
apigee
입니다.kubectl delete job -n
NAMESPACE \ $(kubectl get job -nNAMESPACE \ -o=jsonpath='{.items[?(@.status.succeeded==1)].metadata.name}') apigee-system
네임스페이스에 대해 완료된 작업을 삭제합니다.kubectl delete job -n apigee-system \ $(kubectl get job -n apigee-system \ -o=jsonpath='{.items[?(@.status.succeeded==1)].metadata.name}')
apigeectl
의 이전 버전이 포함된 디렉터리를 가리키도록APIGEECTL_HOME
변수를 변경합니다. 예를 들면 다음과 같습니다.export APIGEECTL_HOME=
PATH_TO_PREVIOUS_APIGEECTL_DIRECTORY - 롤백하려는 설치의 루트 디렉터리에서
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