KJH
Istio - 3(설치 및 예제) 본문
istiod 설치
(1.5 버전 이후 부터는 istiod로 부르고 all-in-one 으로 설치되는듯)
kubectl create namespace istio-system curl -L https://git.io/getLatestIstio | sh - cd istio-1.12.0 helm repo add istio https://istio-release.storage.googleapis.com/charts helm install istio-base -n istio-system manifests/charts/base helm install -n istio-system istio-17 manifests/charts/istio-control/istio-discovery helm install -n istio-system istio-ingress manifests/charts/gateways/istio-ingress helm install -n istio-system istio-egress manifests/charts/gateways/istio-egress helm install istio-cni -n kube-system manifests/charts/istio-cni |
bookinfo 예제 배포
component 설명
- productpage : details와 reviews 서비스를 호출
- details: 책의 상세 정보
- reviews: 책의 리뷰가 담겨있고 ratings 서비스를 호출
- ratings: 책의 별점정보
reviews 서비스는 세가지 버전이 존재함
- v1: ratings 서비스를 호출하지 않음
- v2: ratings 서비스를 호출(검은색)
- v3: ratings 서비스를 호출(빨간색)
default namespace에 istio설정을 활성화 함
kubectl label namespace default istio-injection=enabled kubectl get ns --show-labels kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml kubectl apply -f samples/bookinfo/networking/bookinfo-gateway.yaml |
jaeger (분산 트렌젝션 모니터링)
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.12/samples/addons/jaeger.yaml |
grafana (리소스 모니터링)
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.12/samples/addons/grafana.yaml |
prometheus
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.12/samples/addons/prometheus.yaml |
kiali (트래픽 모니터링)
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.12/samples/addons/kiali.yaml |
테스트 (트래픽을 한번은 보내야 kiali에서 확인할 수 있음)
for i in {1..1000}; do curl -o /dev/null -s -w "%{http_code}" http://IP/productpage done |
destination rule
kubectl apply -f samples/bookinfo/networking/destination-rule-all.yaml |
subset 테스트
jason으로 로그인하면 v2를 보여주고, 그 외는 v1을 보여줌
kubectl apply -f samples/bookinfo/networking/virtual-service-reviews-test-v2.yaml |
'DevOps' 카테고리의 다른 글
Packer (0) | 2023.10.17 |
---|---|
blackbox exporter 배포 및 alertmanager slack 설정 (0) | 2022.11.06 |
Istio - 2 (architecture) (0) | 2021.12.04 |
Istio - 1 (MSA, Service Mesh) (0) | 2021.12.03 |
Percona MongoDB (0) | 2021.11.06 |