Airflow Summit 2021 is coming July 8-16. Register now!

Quick start with kind

This article will show you how to install Airflow using Helm Chart on Kind

Install kind, and create a cluster

We recommend testing with Kubernetes 1.16+, example:

kind create cluster --image kindest/node:v1.18.15

Confirm it’s up:

kubectl cluster-info --context kind-kind

Add Airflow Helm Stable Repo

helm repo add apache-airflow https://airflow.apache.org
helm repo update

Create namespace and Install the chart

export RELEASE_NAME=example-release
export NAMESPACE=example-namespace

kubectl create namespace $NAMESPACE
helm install $RELEASE_NAME apache-airflow/airflow --namespace $NAMESPACE

It may take a few minutes. Confirm the pods are up:

kubectl get pods --namespace $NAMESPACE
helm list --namespace $NAMESPACE

Run kubectl port-forward svc/airflow-webserver 8080:8080 -n airflow to port-forward the Airflow UI to http://localhost:8080/ to confirm Airflow is working.

Build a Docker image from your DAGs

  1. Create a project

    mkdir my-airflow-project && cd my-airflow-project
    mkdir dags  # put dags here
    cat <<EOM > Dockerfile
    FROM apache/airflow
    COPY . .
    EOM
    
  2. Then build the image:

    docker build -t my-dags:0.0.1 .
    
  3. Load the image into kind:

    kind load docker-image my-dags:0.0.1
    
  4. Upgrade Helm deployment:

    helm upgrade $RELEASE_NAME apache-airflow/airflow --namespace $NAMESPACE \
        --set images.airflow.repository=my-dags \
        --set images.airflow.tag=0.0.1
    

Was this entry helpful?