簡體   English   中英

kube.netes 上的 airflow:如何安裝額外的 python 包?

[英]airflow on kubernetes: How to install extra python packages?

我使用 bitnami repo 安裝了 airflow:要安裝額外的 python 包,我安裝了一個額外的卷在此處輸入圖像描述

我准備了我的 requirements.txt 文件,然后我使用kubectl create -n airflow configmap requirements --from-file=requirements.txt創建了一個 ConfigMap 之后我使用 helm upgrade 升級了 airflow....

但是在我的 dags 文件中,我仍然收到錯誤消息“ModuleNotFoundError:沒有名為‘yfinance’的模塊”

將其發布為社區 wiki 以獲得更好的可見性。 隨意擴展它。


正如@Elpis 在評論部分所寫,他按照本指南在 Kube.netes 上安裝了 Apache Airflow。

他通過向worker podweb pod調度程序 pod添加extraVolumeMountsextraVolumes解決了這個問題。

extraVolumeMounts:
  - name: requirements
    mountPath: /bitnami/python/

## Add extra volumes
extraVolumes:
  - name: requirements
    configMap:
# Provide the name of the ConfigMap containing the files you want
# to add to the container
      name: requirements

之后,安裝了所有額外的 Python 個軟件包。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM