💡아래에서는 istio 설치의 기본적인 내용을 다루고 있습니다. values.yaml 내용을 살펴보고 필요한 내용은 수정하여 사용 부탁드립니다.
개요
- istio-base:
- 역할: Istio의 기본 설정과 CRD(Custom Resource Definitions)를 설치합니다.
- 특징:
- Istio의 핵심 구성요소를 위한 기반을 제공합니다.
- CRD를 관리하여 Istio의 커스텀 리소스를 Kubernetes에 등록합니다.
- istio-gateway:
- 역할: Istio의 ingress gateway를 설정하고 배포합니다.
- 특징:
- 외부 트래픽을 Istio 서비스 메시로 라우팅합니다.
- 로드 밸런서 설정, SSL 종료, 프로토콜 변환 등을 처리합니다.
- istiod:
- 역할: Istio의 컨트롤 플레인을 배포합니다.
- 특징:
- 서비스 디스커버리, 구성, 인증서 관리 등 Istio의 핵심 기능을 제공합니다.
- 사이드카 주입, 트래픽 관리, 정책 적용 등을 담당합니다.
Architecture
설치방법
Helm 레포지토리 추가
helm repo add istio <https://istio-release.storage.googleapis.com/charts>
helm repo update
Helm 차트 다운로드 및 설치
helm pull istio/base --untar --untardir ./istio-charts
helm pull istio/istiod --untar --untardir ./istio-charts
helm pull istio/gateway --untar --untardir ./istio-charts
istio profile 설정은 다음 옵션으로 변경할 수 있습니다.
e.g. helm install istio-base . --set profile=default -n istio-system --create-namespace
concept of profile: https://istio.io/latest/docs/setup/additional-setup/config-profiles/
istio-base
cd ./istio-charts/base
# values.yaml 파일을 편집기로 열어 필요한 설정을 변경합니다.
vim values.yaml
# install helm charts
helm install istio-base ./istio-charts/base -n istio-system --create-namespace
- base (base-values.yaml)
- global.istioNamespace: istio-system (Istio 컴포넌트가 설치될 네임스페이스)
- base.enableIstioConfigCRDs: true (Istio 구성 CRD 설치 활성화)
istiod
cd ./istio-charts/istiod
# values.yaml 파일을 편집기로 열어 필요한 설정을 변경합니다.
vim values.yaml
# install helm charts
helm install istiod ./istio-charts/istiod -n istio-system
- istiod (istiod-values.yaml):
- pilot.autoscaleEnabled: true (istiod 자동 스케일링 활성화)
- pilot.resources.requests.cpu: "500m"
- pilot.resources.requests.memory: "2048Mi"
- global.proxy.resources.requests.cpu: "100m"
- global.proxy.resources.requests.memory: "128Mi"
- global.proxy.logLevel: "warning"
istio-gateway
cd ./istio-charts/gateway
# values.yaml 파일을 편집기로 열어 필요한 설정을 변경합니다.
vim values.yaml
# install helm charts
helm install istio-gateway ./istio-charts/gateway -n istio-system
- istio-gateway (gateway-values.yaml):
- replicaCount: 3 (고가용성을 위한 복제본 수)
- service.type: LoadBalancer (클라우드 환경에서 로드밸런서 사용, e.g default: aws clb )
- service.ports: 80, 443 포트 설정 (HTTP, HTTPS 트래픽)
- autoscaling.enabled: true (자동 스케일링 활성화)
- autoscaling.minReplicas: 3
- autoscaling.maxReplicas: 5
설치 확인
kubectl get pods -n istio-system
kubectl get svc -n istio-system
[Option]추가 설정
- 네임스페이스에 Istio 사이드카 주입 활성화:
kubectl label namespace <namespace> istio-injection=enabled
- 모니터링 도구 설치 (선택사항):
kubectl apply -f <https://raw.githubusercontent.com/istio/istio/release-1.22/samples/addons/prometheus.yaml>
kubectl apply -f <https://raw.githubusercontent.com/istio/istio/release-1.22/samples/addons/grafana.yaml>
kubectl apply -f <https://raw.githubusercontent.com/istio/istio/release-1.22/samples/addons/kiali.yaml>
'Cloud-native > Istio' 카테고리의 다른 글
[Istio]Configuring istio-ingressgateway with AWS NLB (0) | 2024.09.15 |
---|---|
[Istio]Configuring istio-ingressgateway with AWS ALB (0) | 2024.09.15 |
[Istio]Traffic Management - 무슨 일이 발생하는 건가?(envoy xDS Sync 이해하기) (0) | 2023.05.06 |
[Istio]Traffic Management - Request Routing(동적 요청 라우팅 구성하기) (0) | 2023.05.06 |
[Istio]Traffic Management - Overview (0) | 2023.05.06 |