mumoshu / kube-airflow

A docker image and kubernetes config files to run Airflow on Kubernetes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How do i add dags

niraj8241 opened this issue · comments

I am trying to add dags but I get the below error

error: error validating "airflow.yaml": error validating data: ValidationError(Deployment.spec.template.spec.containers[0]): unknown field "volumes" in io.k8s.api.core.v1.Container; if you choose to ignore these errors, turn validation off with --validate=false

My YAML snippet:

--- apiVersion: extensions/v1beta1 kind: Deployment metadata: name: scheduler namespace: dev spec: replicas: 1 template: metadata: labels: app: airflow tier: scheduler spec: restartPolicy: Always containers: - name: scheduler image: mumoshu/kube-airflow:1.8.0.0-1.6.1 volumes: - /home/admin/dags/:/usr/local/airflow/dags env: - name: AIRFLOW_HOME value: "/usr/local/airflow" args: ["scheduler", "-n", "5"] ---

I tried to adjust the indent of volumes to be under containers but when I do that I see the following:

error: error converting YAML to JSON: yaml: line 19: mapping values are not allowed in this context

Can you please provide me an example of how to add/delete dags.