Files
zhuangang/topics/devops/k8s/examples/agent-api/ingress.yaml
T

25 lines
691 B
YAML

# 以 ingress-nginx 为例:SSE 流式接口要关闭缓冲、加长读超时。注解名称以所用 Ingress 控制器的文档为准
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: agent-api
annotations:
nginx.ingress.kubernetes.io/proxy-buffering: "off"
nginx.ingress.kubernetes.io/proxy-read-timeout: "300"
spec:
ingressClassName: nginx
tls:
- hosts: ["agent.example.com"]
secretName: agent-example-tls
rules:
- host: agent.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: agent-api
port:
name: http