Last active
February 18, 2022 06:51
-
-
Save hitxiang/df1ca577d992c5a6e8490ccbaf8e7c5a to your computer and use it in GitHub Desktop.
create airflow cluster at local
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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