GKEStartPodOperatorAsync

Astronomer Providers

Executes a task in a Kubernetes pod in the specified Google Kubernetes Engine cluster

Access Instructions

Install the Astronomer Providers provider package into your Airflow environment.

Import the module into your DAG file and instantiate it with your desired params.

Parameters

locationRequiredThe name of the Google Kubernetes Engine zone or region in which the cluster resides, e.g. ‘us-central1-a’
cluster_nameRequiredThe name of the Google Kubernetes Engine cluster the pod should be spawned in
use_internal_ipUse the internal IP address as the endpoint
project_idThe Google Developers Console project ID
gcp_conn_idThe google cloud connection ID to use. This allows for users to specify a service account.
impersonation_chainOptional service account to impersonate using short-term credentials, or list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).
regionalThe location param is whether a region or a zone
is_delete_operator_podWhat to do when the pod reaches its final state, or the execution is interrupted. If True, delete the pod; if False, leave the pod. Current default is False, but this will be changed in the next major release of this provider.

Documentation

Executes a task in a Kubernetes pod in the specified Google Kubernetes Engine cluster

This Operator assumes that the system has gcloud installed and has configured a connection id with a service account.

The minimum required to define a cluster to create are the variables task_id, project_id, location, cluster_name, name, namespace, and image .. seealso:

For more detail about Kubernetes Engine authentication have a look at the reference:
https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl#internal_ip

Was this page helpful?