Kubernetes-Airflow | Setup Apache Airflow on Kubernetes | BPM library
kandi X-RAY | Kubernetes-Airflow Summary
kandi X-RAY | Kubernetes-Airflow Summary
Setup Apache Airflow on Kubernetes
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Kubernetes-Airflow
Kubernetes-Airflow Key Features
Kubernetes-Airflow Examples and Code Snippets
Community Discussions
Trending Discussions on Kubernetes-Airflow
QUESTION
I'm setting up Airflow in Kubernetes Engine, and I now have the following (running) pods:
- postgres (with a mounted
PersistentVolumeClaim
) - flower
- web (airflow dashboard)
- rabbitmq
- scheduler
- worker
From Airflow, I'd like to run a task starting a pod which - in this case - downloads some file from an SFTP server. However, the KubernetesPodOperator
in Airflow which should start this new pod can't run, because the kubeconfig cannot be found.
The Airflow worker is configured as below. The other Airflow pods are exactly the same apart from different args
.
ANSWER
Answered 2019-Jan-26 at 06:58As is described in The Fine Manual, you will want in_cluster=True
to advise KPO that it is, in fact, in-cluster.
I would actually recommend filing a bug with Airflow because Airflow can trivially detect the fact that it is running inside the cluster, and should have a much more sane default than your experience.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Kubernetes-Airflow
To create the persistent volume run kubectl apply -f airflow-pvc.yml
To check your new persistent volume run claim kubectl get pvc
Create the Airflow image on your local machine running the following command:
Make sure your image has been created successfully running docker images to list all the local images.
Push the image to your cloud provider (in this case IBM Cloud):
Create the Airflow web running the following command:
Ensure your deployment is running using the kubectl get deployments command. To view more details run kubectl get pods to view all the pods, copy your dep-airflow-web pod and run the command kubectl describe pod dep-airflow-web-<some code>.
Create the Airflow scheduler running the following:
Follow the steps in Airflow web to check the deployment is running.
A more secure way is port-forwarding the pod port to your local machine. To do so, get the pod name from your deployment running kubectl get pods and then using the pod name run:
Exposing the port so it can be accessed using the Kubernetes cluster IP. To do so create the Airflow service running kubectl create -f service-airflow.yml Check your service has been created running kubectl get services.
Creating Persistent Volumes on IBM Cloud
Handling volumes permissions on IBM Cloud
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page