【发布时间】:2020-05-19 02:07:20
【问题描述】:
我正在尝试为 Airflow 网络服务设置 istio 我当前的气流网址是http://myorg.com:8080/appv1/airflow(没有 istio)
在尝试与 istio 集成后,我编写了如下所示的虚拟服务,但最终得到 404 Not Found。我正在尝试从http://myorg.com/v1airlfow访问网址
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: airflow-vservice
namespace: "{{ .Release.Namespace }}"
spec:
hosts:
- "*"
gateways:
- airflow-gateway
http:
- name: airflow-http
match:
- uri:
exact: "/v1airflow"
- uri:
exact: "/v1airflow/"
rewrite:
uri: "/appv1/airflow/"
route:
- destination:
host: {{ .Release.Name }}-airflow-web.{{ .Release.Namespace }}.svc.cluster.local
port:
number: 8080
headers:
request:
set:
X-Forwarded-Proto: "http"
---
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: airflow-gateway
namespace: "{{ .Release.Namespace }}"
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 80
name: airflow-http
protocol: HTTP
hosts:
- "*"
【问题讨论】:
-
您好,您使用的是什么平台?您使用哪些 k8s 和 istio 版本?
-
@PiotrMalec - 我使用 istio 1.5.0 和 k8s 1.16.7
标签: kubernetes airflow istio