Gateway와 VirtualService
목차
Gateway 개요
apiVersion: networking.istio.io/v1
kind: Gateway
metadata:
name: my-gateway
namespace: istio-system
spec:
selector:
istio: ingressgateway # Ingress Gateway 파드 선택
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "myapp.example.com"
- port:
number: 443
name: https
protocol: HTTPS
tls:
mode: SIMPLE
credentialName: myapp-tls-secret
hosts:
- "myapp.example.com"VirtualService 개요
기본 설정
HTTP 트래픽
HTTPS 트래픽
실전 예제
Path 기반 라우팅
Header 기반 라우팅
다중 도메인 설정
고급 패턴
HTTP to HTTPS 리다이렉트
URL Rewrite
Header 추가/수정
Redirect
문제 해결
Gateway가 작동하지 않음
VirtualService 라우팅 실패
TLS 인증서 문제
모범 사례
참고 자료
마지막 업데이트