Ask Your Question
0

How do I ensure that the logs of Airflow using the Airflow community chart persist on Google Cloud Kubernetes Engine?

asked 2022-03-12 11:00:00 +0000

david gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-06-21 11:00:00 +0000

nofretete gravatar image

To ensure that the logs of Airflow using the Airflow community chart persist on Google Cloud Kubernetes Engine, you can follow these steps:

  1. Create a Google Cloud Storage bucket to store the logs.

  2. Modify the values.yaml file for the Airflow chart to include the Google Cloud Storage bucket name as the data.logs.persistence.bucketName value.

  3. Deploy the Airflow chart using the modified values.yaml file.

  4. Configure Airflow to use the Google Cloud Storage bucket as the log handler. You can do this by modifying the airflow.cfg file and adding the following section:

    [handler_gcs]
    class = airflow.contrib.hooks.gcs_log_upload_handler.GoogleCloudStorageUploadHandler
    base_log_folder = gs://<bucket-name>/logs
    
    1. Update the Airflow deployment in Kubernetes to include the airflow.cfg file with the above configuration changes.

    After following these steps, the logs generated by Airflow will be stored in the Google Cloud Storage bucket, ensuring that they persist even if the Kubernetes pods are restarted or terminated.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-03-12 11:00:00 +0000

Seen: 8 times

Last updated: Jun 21 '22