DevOps와 Infra/AWS EKS
09. [AWS EKS] istio와 istio gateway 설치
Tech김백엔드
2023. 9. 10. 14:59
회사에서 내부적으로 설치 방법을 정리한 글이라 설명은 생략함.
Istio install
istio를 통한 control plane설치와, 외부에서 istio를 접속할 수 있는 istio gateway 설치
kubectl 1.27을 우리는 사용하므로 이에 호환되는 istio version인 1.18.1을 설치한다.
$ mkdir istio-install
$ cd istio-install/
$ curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.18.1 sh -
명령어 실행을 위해 PATH 설정해준다.
$ export PATH="$PATH:/home/ubuntu/istio-install/istio-1.18.1/bin"
$ istioctl version
istio operator 설치
$ istioctl operator init
$ kubectl get po -n istio-operator
istio-demo.yml 파일 생성
$ sudo nano istio-demo.yaml
이 파일에 다음 복사/붙이기
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
namespace: istio-system
name: example-istiocontrolplane
spec:
profile: demo
apply
$ kubectl apply -f istio-demo.yaml
// istiooperator.install.istio.io/example-istiocontrolplane created
확인
$ kubectl get iop -n istio-system
NAME REVISION STATUS AGE
example-istiocontrolplane HEALTHY 47h
위에 iop는 istio-operator의 약어
Jaeger는 다운받은 istio 폴더 안에서 제공한다.
$ cd /home/ubuntu/istio-install/istio-1.18.1/samples/addons
Kiali와 Jaeger는 나중에 LoadBalancer를 추가하고 싶을 때 kubectl edit svc로 추가하면 되고, 코드 수정할 필요없이 바로 적용하면 된다.
kubectl apply -f kiali.yaml
kubectl apply -f jaeger.yaml
Istio-gateway 설치
istio-gateway.yaml 생성
---
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
name: x2bee-com-gateway
namespace: x2bee-gateway
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 80
name: http-wildcard
protocol: HTTP
hosts:
- "*.x2bee.com"
---
kind: VirtualService 부분은 pipeline code에 들어있다.
위 yaml을 적용
$ kubectl apply -f istio-gateway.yaml