ale*_*lex 4 kubernetes airflow kubernetes-helm
在我从 Helm stable/airflow 存储库安装的 Kubernetes 上运行 Airflow 时,运行气流命令时遇到困难。例如,我尝试执行调度程序 pod 并运行airflow list,但出现以下错误:
airflow.exceptions.AirflowConfigException: error: cannot use sqlite with the KubernetesExecutor airlow
Run Code Online (Sandbox Code Playgroud)
好的,所以我切换到 celery 执行器。
一样
airflow.exceptions.AirflowConfigException: error: cannot use sqlite with the CeleryExecutor
Run Code Online (Sandbox Code Playgroud)
那么在 K8s 上运行 Airflow CLI 命令的正确方法是什么?
确保您正在使用bash. /home/airflow/.bashrc从中导入环境变量/home/airflow/airflow_env.sh以设置连接。以下是一些示例:
kubectl exec -ti airflow-scheduler-nnn-nnn -- /bin/bash
$ airflow list_dags
Run Code Online (Sandbox Code Playgroud)
或者使用 shell,您可以自己导入环境变量:
kubectl exec -ti airflow-scheduler-nnn-nnn -- sh -c ". /home/airflow/airflow_env.sh && airflow list_dags"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2309 次 |
| 最近记录: |