範例 Airflow DAG,展示如何在 Google Kubernetes Engine 中建立 Dataproc 叢集。
所需環境變數:GKE_NAMESPACE = os.environ.get(“GKE_NAMESPACE”, f”{CLUSTER_NAME}”) 一個 GKE 叢集可以支援多個在不同命名空間中運行的 DP 叢集。定義一個命名空間或分配一個預設命名空間。請注意:VIRTUAL_CLUSTER_CONFIG 中的可選 kubernetes_namespace 參數應與 GKE_NAMESPACE 相同
模組內容
-
tests.system.google.cloud.dataproc.example_dataproc_gke.ENV_ID[source]
-
tests.system.google.cloud.dataproc.example_dataproc_gke.DAG_ID = 'dataproc_gke'[source]
-
tests.system.google.cloud.dataproc.example_dataproc_gke.PROJECT_ID[source]
-
tests.system.google.cloud.dataproc.example_dataproc_gke.REGION = 'us-central1'[source]
-
tests.system.google.cloud.dataproc.example_dataproc_gke.CLUSTER_NAME_BASE[source]
-
tests.system.google.cloud.dataproc.example_dataproc_gke.CLUSTER_NAME_FULL[source]
-
tests.system.google.cloud.dataproc.example_dataproc_gke.CLUSTER_NAME[source]
-
tests.system.google.cloud.dataproc.example_dataproc_gke.GKE_CLUSTER_NAME[source]
-
tests.system.google.cloud.dataproc.example_dataproc_gke.WORKLOAD_POOL[source]
-
tests.system.google.cloud.dataproc.example_dataproc_gke.GKE_CLUSTER_CONFIG[source]
-
tests.system.google.cloud.dataproc.example_dataproc_gke.GKE_NAMESPACE[source]
-
tests.system.google.cloud.dataproc.example_dataproc_gke.VIRTUAL_CLUSTER_CONFIG[source]
-
tests.system.google.cloud.dataproc.example_dataproc_gke.create_gke_cluster[source]
-
tests.system.google.cloud.dataproc.example_dataproc_gke.test_run[source]