Skip to content

Atsushi141/gke_airflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Overview

Create Airflow cluster on GKE along with Rodel van Rooijen's post on Medium without gcloud and kubectl commands by using Terraform and helm.

A few differences are made as follows:

Before you apply terraform

Prepare the following command line tools.

  • gcloud
  • docker
  • kubectl
  • helm

Please be aware of the following points.

  • Terraform code will delete ~/.kube directory for overwriting GKE credential. Back up ~/.kube directory if necessary.
  • GCP projects needs be created before terraform apply and all mandatory GCP APIs are enabled.

Notes

This is not production level code in terms of the followings:

  • Default VPC network should be replaced with custom VPC for security.
  • CloudSQL password should be handed through in more secure way such as Secret Manager, not terraform variable.
  • Terraform state file should be on GCS, not in local environment.
  • Managing DAG files with Git-sync is more handy.
  • Logs will only be available during the lifetime of the pod.
  • And, etc...

You might use this Airflow environment for developing DAGs.

Tricky points

References

Deploying Airflow on GKE using Helm

Workload Identity in GKE with Terraform

Dynamic Provisioning and Storage Classes in Kubernetes

Persistent volumes and dynamic provisioning

GitHub: airflow-helm/charts

Apache Airflow ETL in Google Cloud

Alternative: link Kubernetes ServiceAccounts to IAM

Deploying Airflow on Google Kubernetes Engine with Helm

Deploying Airflow on Google Kubernetes Engine with Helm — Part Two

Airflow Helm: Production Guide

Memo in technical aspects

This is just memo what I discovered during the development.

  • Compute Engine Disk does not support ReadWriteMany of PVC.
  • standards-rwo Storage Class does not create Compute Engine immediately after creating PVC.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages