Restoring Directed Acyclic Graph code from a deleted Google Kubernetes Engine cluster

Problem

You inadvertently deleted the Google Kubernetes Engine cluster used by your Composer environment. How can you restore/reconnect a new instance to the old Cloud SQL metadata database of the old Composer instance?

Environment

  • All Cloud Composer Environments

Solution

  1. Create a new Composer environment and deploy your DAGs there.
Deleting the Google Kubernetes cluster does not mean the DAG code is lost. Moving to a new environment, only the metadata of the DAGs will be lost.