Skip to content

Instantly share code, notes, and snippets.

@hitxiang
Last active February 18, 2022 06:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hitxiang/df1ca577d992c5a6e8490ccbaf8e7c5a to your computer and use it in GitHub Desktop.
Save hitxiang/df1ca577d992c5a6e8490ccbaf8e7c5a to your computer and use it in GitHub Desktop.
create airflow cluster at local
https://github.com/marclamberti/webinar-airflow-chart/blob/master/values.yaml
# create local k8s cluster
kind create cluster --name airflow-cluster --config kind-cluster.yaml
kubectl cluster-info
kubect get nodes -o wide
# create namespace
kubectl create namespace Airflow
kubectl get ns
helm repo add apache-airflow https://airflow.apache.org
helm repo UPDATE
helm search repo Airflow
helm install airflow apache-airflow/airflow -n airflow --debug --timeout 10m0s
helm ls -n airlfow
kubectl -n airflow get pods
kubectl -n airflow port-forward svc/airflow-webserver 8080:8080
# log in as admin / admin
# change value.yaml
helm show values apache-airflow/airflow > values.yaml
# edit values.yaml and update helm
helm upgrade -f new-values.yml {release name} {package name or path} --version {fixed-version}
helm upgrade -f values.yml airflow apache-airflow/airflow
# apply configmap
# airflow greate expection
# put into requirements.txt
# create dockerfile, build image
docker build -t $USERNAME/$IMAGE:latest .
docker tag $USERNAME/$IMAGE:latest $USERNAME/$IMAGE:$version
# load image
kind --name airflow-cluster load docker-image airflow-custom:1.0.0
# add DAGS by git sync
# airflow-2-dags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment