GKEStartPodOperator

Google

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

View Source

Last Updated: May. 7, 2021

Access Instructions

Install the Google provider package into your Airflow environment.

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

Parameters

locationstrThe name of the Google Kubernetes Engine zone in which the cluster resides, e.g. 'us-central1-a'
cluster_namestrThe name of the Google Kubernetes Engine cluster the pod should be spawned in
use_internal_ipUse the internal IP address as the endpoint.
project_idstrThe Google Developers Console project id
gcp_conn_idstrThe google cloud connection id to use. This allows for users to specify a service account.

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

See also

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

See also

For more information on how to use this operator, take a look at the guide: Run a Pod on a GKE cluster

Was this page helpful?