DAG task fails with an error

Problem

Your Composer DAG task fails with an error message:
Failed to execute job JOB_NUMBER for task DAG_TASK_NAME (Pod GKE_POD_NAME returned a failure.

Environment

  • Cloud Composer
  • DAG task operator is GKEStartPodOperator or KubernetesPodOperator
  • Airflow worker logs

Solution

  1. Resolve the issue with the downstream GKE cluster that is being called by the task operator.

Cause

This error is emitted by the downstream GKE cluster that is called by the task operator. It indicates a problem with the downstream cluster, and this bubbles up as an error message in Composer and causes the task to fail.