Kubernetes Ingress + Apache气流

编程入门 行业动态 更新时间:2024-10-23 11:23:13
本文介绍了Kubernetes Ingress + Apache气流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

你能帮我吗?

我正在尝试在vpc中的Kubernetes(AWS)中启动Apache airflow. 我正在使用头盔稳定/气流7.1.1

I'm trying to start Apache airflow in Kubernetes (AWS), in vpc. I'm using helm stable/airflow 7.1.1

一切正常.但是要访问Web界面,我需要通过入口ELB公开它. 我有这个设置. 气流规则如下所示:

Everything starts ok. But to get access to web interface I need to expose it via ingress ELB. I have this setup. The rule for airflow looks like this:

apiVersion: v1 items: - apiVersion: extensions/v1beta1 kind: Ingress metadata: annotations: kubernetes.io/ingress.class: nginx nginx.ingress.kubernetes.io/connection-proxy-header: upgrade nginx.ingress.kubernetes.io/rewrite-target: /$2 creationTimestamp: "2020-05-29T14:52:54Z" generation: 31 labels: app.kubernetes.io/instance: airflow-dev-web app.kubernetes.io/managed-by: Tiller app.kubernetes.io/name: airflow-dev-web app.kubernetes.io/version: "1.0" helm.sh/chart: web-service-0.1.0 name: airflow namespace: dev resourceVersion: "45272238" selfLink: /apis/extensions/v1beta1/namespaces/dev/ingresses/airflow uid: 64f276ad-b51f-4551-8078-51a7184b04b4 spec: rules: - host: public.host http: paths: - backend: serviceName: airflow-dev-web servicePort: 8080 path: /airflow(/|$)(.*) status: loadBalancer: ingress: - ip: <public_ip>

我可以用/health打开/health:

I can open the /health with is OK:

public.host/airflow/health

但是当我打开管理Web端点时:

But when I open admin web endpoint:

public.host/airflow/admin

我有许多未重写的url-它们指向的是public.host,而不是public.host/airflow/....就像这样:

I have many not rewritten urls - they are pointing to public.host but not to public.host/airflow/ .... Like this:

URL: public.host/admin/admin/bootstrap/bootstrap3/css/bootstrap-theme.min.css?v=3.3.5 Status: 404 Not Found

我发现我需要对反向代理进行特殊设置.像这里:

I found that I need special setup for reverse proxy.. Like here:

airflow.readthedocs.io/en /stable/howto/run-behind-proxy.html

但是我找不到如何使用Ingress ....:((

But I cannot find how to do this using Ingress.... :((

请帮助我!

推荐答案

不再是实际的. 使用以下方法赢得了它:

Is not actual anymore. Have won it using:

nginx.ingress.kubernetes.io/server-snippet: | proxy_set_header Host $host; proxy_redirect off; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade";

还需要设置气流:

ENABLE_PROXY_FIX: "True"

baseUrl: "local.airflow/airflow"

更多推荐

Kubernetes Ingress + Apache气流

本文发布于:2023-11-23 19:45:56,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1622662.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:气流   Kubernetes   Ingress   Apache

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!