Gateway API란
Ingress의 한계를 극복하는 Kubernetes의 차세대 트래픽 관리 API입니다. 더 풍부한 라우팅 규칙을 지원합니다.
기본 설정
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: main-gateway
spec:
gatewayClassName: istio
listeners:
- name: https
port: 443
protocol: HTTPS
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: api-route
spec:
parentRefs:
- name: main-gateway
rules:
- matches:
- path: { type: PathPrefix, value: /api }
backendRefs:
- name: api-service
port: 8080
댓글 0