Giter Site home page Giter Site logo

self-managed-airflow's Introduction

Self-Managed Apache Airflow on EKS with Terraform

Self-Managed Apache Airflow

  • Greater level of control of the configuration of Apache Airflow
  • Need to run workflows that use more resources than AWS Managed services
  • Total cost of Ownership

Prerequisites

  • Terraform
  • Helm
  • AWS CLI
  • Kubectl
  • AWS account with sufficient privileges

Resources

The resources created include

  • EKS Cluster Control plane with public endpoint
  • One managed node group - Node group made up of 2 instances spanning 2azs

References

eks-cluster.tf

resource "kubernetes_service_account" "eksadmin" {
  metadata {
    name = "eks-admin"
    namespace = "kube-system"
  }
}

In setting up Apache Airflow on Amazon EKS, the "eks-admin" service account is often granted necessary RBAC (Role-Based Access Control) permissions to perform actions within the Kubernetes cluster.

Apache Airflow often requires specific permissions to create and manage Kubernetes pods, services, and other resources. By creating a dedicated service account and configuring appropriate RBAC rules, you can ensure that Airflow has the necessary permissions to interact with the Kubernetes cluster.

resource "kubernetes_cluster_role_binding" "eksadmin" {
  metadata {
    name = "eks-admin"
  }
  role_ref {
    api_group = "rbac.authorization.k8s.io"
    kind      = "ClusterRole"
    name      = "cluster-admin"
  }
  subject {
    kind      = "ServiceAccount"
    name      = "eks-admin"
    namespace = "kube-system"
  }
}

Putting it all together, this kubernetes_cluster_role_binding resource is binding the "eks-admin" ServiceAccount in the "kube-system" namespace to the "cluster-admin" ClusterRole. This essentially gives the "eks-admin" ServiceAccount broad administrative permissions over the entire Kubernetes cluster.

self-managed-airflow's People

Contributors

alero-awani avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.