diff --git a/k8s/ingress.yaml b/k8s/ingress.yaml index 89fec5e..20bcc5e 100644 --- a/k8s/ingress.yaml +++ b/k8s/ingress.yaml @@ -6,7 +6,6 @@ metadata: namespace: drone annotations: traefik.ingress.kubernetes.io/router.entrypoints: websecure - # traefik.ingress.kubernetes.io/service.protocol: http spec: tls: - hosts: @@ -16,6 +15,15 @@ spec: - host: sales.violin-work.online http: paths: + # /api 路径转发到后端服务 + - path: /api + pathType: Prefix + backend: + service: + name: todo-backend + port: + number: 80 + # 其他路径转发到前端服务 - path: / pathType: Prefix backend: