Airflow Kubernetes 执行器未创建 pods
Airflow Kubernetes Executor not creating pods
我正在尝试使用 Kubernetes 执行器为 Airflow 创建一个设置。但是,我遇到一个问题,即 Airflow 在执行任务时无法创建 pods。然而,初始设置能够很好地创建组成部分。
关于airflow值文件和kubectl资源的代码,请参阅https://github.com/neku-dev-88/airflow_kubernetes。
我在本地设置的方式是在命令提示符中安装以下步骤(Windows,我使用种类:https://kind.sigs.k8s.io/):
- kind 创建集群 --image kindest/node:v1.18.15
- helm 回购添加气流稳定 https://airflow-helm.github.io/charts
- kubectl apply -n airflow-staging -f roles.yaml
- helm install airflow-staging airflow-stable/airflow -f charts/airflow/values-staging.yaml --namespace airflow-staging
当我尝试 运行 DAG 时,它只停留在“运行”状态:
in running status
我发现没有创建新的 pods:
no new pods
我什至创建了一个 airflow 服务角色并使用集群角色绑定给它一个集群角色来创建 pods,但没有运气。
值文件:
###################################
## CONFIG | Kubernetes ServiceAccount
###################################
serviceAccount:
## if a Kubernetes ServiceAccount is created
## - if `false`, you must create the service account outside this chart with name: `serviceAccount.name`
##
create: true
## the name of the ServiceAccount
## - by default the name is generated using the `airflow.serviceAccountName` template in `_helpers/common.tpl`
##
name: airflow
角色文件:
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: pods-permissions
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "list", "watch", "create", "delete"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: airflow-pods
namespace: airflow-staging
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: pods-permissions
subjects:
- kind: ServiceAccount
name: airflow
namespace: airflow-staging
---
我觉得我在设置中遗漏了一些东西,请指教。
我弄明白了,问题是我的 DAG 都已暂停,需要取消暂停。
我正在尝试使用 Kubernetes 执行器为 Airflow 创建一个设置。但是,我遇到一个问题,即 Airflow 在执行任务时无法创建 pods。然而,初始设置能够很好地创建组成部分。
关于airflow值文件和kubectl资源的代码,请参阅https://github.com/neku-dev-88/airflow_kubernetes。
我在本地设置的方式是在命令提示符中安装以下步骤(Windows,我使用种类:https://kind.sigs.k8s.io/):
- kind 创建集群 --image kindest/node:v1.18.15
- helm 回购添加气流稳定 https://airflow-helm.github.io/charts
- kubectl apply -n airflow-staging -f roles.yaml
- helm install airflow-staging airflow-stable/airflow -f charts/airflow/values-staging.yaml --namespace airflow-staging
当我尝试 运行 DAG 时,它只停留在“运行”状态: in running status
我发现没有创建新的 pods: no new pods
我什至创建了一个 airflow 服务角色并使用集群角色绑定给它一个集群角色来创建 pods,但没有运气。
值文件:
###################################
## CONFIG | Kubernetes ServiceAccount
###################################
serviceAccount:
## if a Kubernetes ServiceAccount is created
## - if `false`, you must create the service account outside this chart with name: `serviceAccount.name`
##
create: true
## the name of the ServiceAccount
## - by default the name is generated using the `airflow.serviceAccountName` template in `_helpers/common.tpl`
##
name: airflow
角色文件:
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: pods-permissions
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "list", "watch", "create", "delete"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: airflow-pods
namespace: airflow-staging
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: pods-permissions
subjects:
- kind: ServiceAccount
name: airflow
namespace: airflow-staging
---
我觉得我在设置中遗漏了一些东西,请指教。
我弄明白了,问题是我的 DAG 都已暂停,需要取消暂停。