반응형
AWS ALB와 istio의 ingressgateway와 연결해서 사용할 수 있도록 해주겠습니다.
방법은 간단합니다.
저 같은 경우에는 istio-ingressgateway를 helm 차트에서 설치를 해주었습니다.
helm repo add istio-official https://istio-release.storage.googleapis.com/charts
helm install my-gateway istio-official/gateway -f values.yaml
다만, values.yaml
에서 서비스 타입을 기본 LoadBalancer가 아닌 ClusterIP로 설정을 해주었습니다.
values.yaml
---
service:
# Type of service. Set to "None" to disable the service entirely
type: ClusterIP # 여기
ports:
- name: status-port
port: 15021
protocol: TCP
targetPort: 15021
- name: http2
port: 80
protocol: TCP
targetPort: 80
- name: https
port: 443
protocol: TCP
targetPort: 443
annotations: {}
loadBalancerIP: ""
loadBalancerSourceRanges: []
externalTrafficPolicy: ""
externalIPs: []
ipFamilyPolicy: ""
ipFamilies: []
## Whether to automatically allocate NodePorts (only for LoadBalancers).
# allocateLoadBalancerNodePorts: false
## Set LoadBalancer class (only for LoadBalancers).
# loadBalancerClass: ""
그리고 이제 ingress.yaml
파일을 작성해주면 됩니다.
- 여기서 꼭 Ingress 리소스 생성을 istio-ingressgateway가 설치된 네임스페이스에서 생성해주어야 합니다.
- Ingress는 전역 리소스가 아니기 때문에 꼭 같은 네임스페이스에서 생성을 해주어야 합니다.
apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: common-alb namespace: istio-system # istio-ingressgateway가 설치된 네임스페이스에서 ingress 생성해야함 annotations: alb.ingress.kubernetes.io/scheme: internet-facing alb.ingress.kubernetes.io/target-type: ip alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS": 443}]' alb.ingress.kubernetes.io/certificate-arn: <# 자신의 ACM의 ARN> alb.ingress.kubernetes.io/ssl-redirect: '443' alb.ingress.kubernetes.io/group.name: shared-alb spec: ingressClassName: alb # 여기에 꼭 alb 넣어주어야 함 rules: - host: kingsuhan.outcode.ai http: paths: - path: / pathType: Prefix backend: service: name: istio-gateway # helm 차트로 설치한 istio-ingressgateway의 서비스 이름 port: number: 80
위와 같이 작성을 해주고 적용 시키면 ALB 를 통해 들어온 트래픽을 istio-gateway 에서 받아서 조정할 수 있습니다.
이상 입니다.
반응형
'Monitoring' 카테고리의 다른 글
Istio, Kiali 설치 및 Prometheus, Grafana 연결 (Using Helm) (2) | 2025.07.24 |
---|---|
트래픽 조절하면서 Canary 배포 해보기 (used by Istio) (2) | 2025.07.24 |
telegraf <-> Prometheus <-> Grafana 연결하여 모니터링 해보기 (1) | 2024.11.21 |
Prometheus - Grafana 설치 (Helm 차트) (0) | 2024.11.15 |
ELK 연결 구성 (filebeat 포함) (4) | 2024.09.24 |