-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathingress.yaml
42 lines (41 loc) · 1.67 KB
/
ingress.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
apiVersion: networking.k8s.io/v1 # API version for Ingress resource
kind: Ingress # Declares this resource as an Ingress
metadata:
name: asr-ingress # Name of the Ingress resource
annotations:
kubernetes.io/ingress.class: alb # Specifies the ingress controller to use (AWS ALB in this case)
alb.ingress.kubernetes.io/scheme: internet-facing # Exposes the ALB to the internet (can also be 'internal')
alb.ingress.kubernetes.io/target-type: ip # ALB forwards traffic directly to Pod IPs
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}]' # ALB listens on port 80 for HTTP traffic
spec:
rules: # Ingress routing rules
- http:
paths:
- path: /health # Route traffic for /health
pathType: Prefix # Matches any path that starts with /health
backend:
service:
name: asr-service # Service to route traffic to
port:
number: 80 # Port on the Service to route to
- path: / # Route traffic for /
pathType: Prefix
backend:
service:
name: asr-service
port:
number: 80
- path: /ws # Route traffic for /ws (e.g., for WebSocket connections)
pathType: Prefix
backend:
service:
name: asr-service
port:
number: 80
- path: /metrics # Route traffic for /metrics (for Prometheus scraping)
pathType: Prefix
backend:
service:
name: asr-service
port:
number: 80