我在Kubernetes上有一个Apache Airflow(通过Google Composer)。我想在Secret中检索一个变量存储:
我需要从Airflow中的DAG中使用存储在此Secret中的变量。
最佳答案
变量存储为“Environment Vars”,因此在Python中非常简单:
import os
os.environ['DB_USER'])
关于python - 从Google Composer( Airflow )检索Kubernetes的 secret ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/52662514/