Istio, kiali 설치 및 구성

문학적인유사성·2023년 6월 13일
0

뎁옵깃옵쿠베

목록 보기
12/46
post-thumbnail

istio 공식문서

참고 단어 뜻

kubernetes : The name "Kubernetes" is derived from the Greek word "κυβερνήτης" (pronounced "kubernítis"), which means "helmsman" or "pilot."
istio : The Istio project's name was derived from the Greek word "ιστίο," which means "sail" or "veil.
envoy : a messenger or representative, especially one on a diplomatic mission.

istio

출저 : istio 설명 유튜브

(control plane)

  • Pilot: 서비스 디스커버리를 관리하고, 서비스 메시 구성을 추상화하며, 트래픽 라우팅 및 부하 분산을 위한 정책을 관리하는 역할. 이를 통해 서비스 간 통신을 관리하고 모니터링

  • Galley: Istio의 구성 요소들을 관리하는 역할. 구체적으로는 Istio 구성을 검증하고 유효성을 검사하며, 구성 업데이트를 적용하고 배포. 또한, Galley는 구성 변경 사항을 모니터링하여 관련된 구성을 유지하고 필요에 따라 구성을 다시 로드

  • Citadel: Istio 서비스 메시의 보안을 담당하는 역할. 서비스 간 통신의 인증과 권한 부여를 처리하며, Transport Layer Security (TLS) 인증서를 생성하고 관리. Citadel은 서비스 간의 안전한 통신을 제공하기 위해 인증 및 암호화를 처리

(data plane)

  • Envoy: Istio의 데이터 평면 역할을 수행. 프록시 서버로 작동하며, 서비스 간의 모든 통신을 중재. 트래픽 라우팅, 부하 분산, 장애 조치, 모니터링 등 다양한 기능을 제공하여 서비스 메시의 동작을 지원.

**
VirtualService 와 Destination Rule을 가지고, 트래픽이 어디로 갈지 조절하는 것이라고 생각하면됨.

생각해보면, weather frontend에서 weather backend v1, v2에 90퍼 10퍼주는게 어려움...
istio는 이것을 가능하게 해줌.


1. DestinationRule 생성 : where to go
2. Gateway Componenet 생성 : allow inbound traffic
3. VirtualService 생성 : tell requests when they get to the ingress gateway where to direct them to
4. Update deployment : update to istio-ingressgateway.istio-system

(security)
1. Policy 설정 : for security
2. DestinationRule: mtls-mutual

갓 envoy..?
** 나만의 언어로 조금 정리해보면...

  • Gateway : 수문장
  • VirtualSerivce : 들어오고 나서, 목적지
  • Destination Rule : 들어와서 어디로 갈지
  • policy : 규칙 정하는거, pass or deny

설치

쿠베 공식문서 오퍼레이터 패턴
istio버전 k8s지원

curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.18.0 TARGET_ARCH=x86_64 sh -
docker pull docker.io/istio/pilot:1.18.0
docker pull docker.io/istio/proxyv2:1.18.0

# istioctl uninstall --purge
istioctl install -f manifest.yaml
 
root@eksadmin:/eks-anywhere-vSphere-dmz/istio# cat manifest.yaml
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
  hub: ${endpoint를 만든 dmz 하버}/proxy-docker/istio

chmod +x istioctl
sudo mv ./istioctl /usr/local/bin
istioctl version

istioctl install -f manifest.yaml
This will install the Istio 1.18.0 default profile with ["Istio core" "Istiod" "Ingress gateways"] components into the cluster. Proceed? (y/N) y
✔ Istio core installed
✔ Istiod installed
✔ Ingress gateways installed
✔ Installation complete Making this installation the default for injection and validation.


kubectl label namespace test istio-injection=enabled


참고 링크

devocean 참고링크 eks연재-2

istio 공식문서 사용가능한 profile보기

istio 공식문서 추가 설치 profile 설정

kiali

반입

https://raw.githubusercontent.com/istio/istio/release-1.18/samples/addons/kiali.yaml

위의 yaml파일 반입, 이미지 kiali 반입

kiali 접근할수있게 설정

root@eksadmin:/eks-anywhere-vSphere-dmz/istio/kiali# cat gw.yaml
---
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: kiali-gateway
  namespace: istio-system
spec:
  selector:
    istio: ingressgateway
  servers:
  - port:
      number: 80
      name: http-kiali
      protocol: HTTP
    hosts:
    - "eksanywhere.kiali.com"
    
    
root@eksadmin:/eks-anywhere-vSphere-dmz/istio/kiali# cat vs.yaml
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: kiali-vs
  namespace: istio-system
spec:
  hosts:
  - "eksanywhere.kiali.com"
  gateways:
  - kiali-gateway
  http:
  - route:
    - destination:
        host: kiali
        port:
          number: 20001
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: kiali
  namespace: istio-system
spec:
  host: kiali
  trafficPolicy:
    tls:
      mode: DISABLE

결과

이제 화면을 볼수있다.
이제 추가적인 설정으로 실제 kiali와 istio를 준비해야한당!

키알리 프로메테우스 연결 다음 글


참고 블로그

이스티오 공식 다큐로 이해가 안되서 개념 잡을때 본글
이스티오 블로그 참고 0
이스티오 관련 티스토리 0
이스티오, 키알리 설치 팁
이스티오 글
이스티오 예제 공식문서
프로메테우스 설정
이스티오 프로메테우스 설치 팁
프로메테우스 cm 설정 예시
프로메테우스 공식문서

0개의 댓글