You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/05/16 04:29:18 UTC

[GitHub] [airflow] tanjinP opened a new pull request #8883: [AIRFLOW-6290] Create guide for GKE operators

tanjinP opened a new pull request #8883:
URL: https://github.com/apache/airflow/pull/8883


   Closes AIRFLOW-6290 / issue #8206 .
   
   Contains a guide that is appropriately linked to on how to use the various operators in GKE Service.
   
   ---
   Make sure to mark the boxes below before creating PR: [x]
   
   - [ ] Description above provides context of the change
   - [ ] Unit tests coverage for changes (not needed for documentation changes)
   - [ ] Target Github ISSUE in description if exists
   - [ ] Commits follow "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)"
   - [ ] Relevant documentation is updated including usage instructions.
   - [ ] I will engage committers as explained in [Contribution Workflow Example](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#contribution-workflow-example).
   
   ---
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   Read the [Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines) for more information.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] tanjinP commented on a change in pull request #8883: [AIRFLOW-6290] Create guide for GKE operators

Posted by GitBox <gi...@apache.org>.
tanjinP commented on a change in pull request #8883:
URL: https://github.com/apache/airflow/pull/8883#discussion_r427730942



##########
File path: docs/howto/operator/gcp/kubernetes_engine.rst
##########
@@ -0,0 +1,122 @@
+ .. Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+ ..   http://www.apache.org/licenses/LICENSE-2.0
+
+ .. Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+
+
+Google Kubernetes Engine Operators
+==================================
+
+`Google Kubernetes Engine (GKE) <https://cloud.google.com/kubernetes-engine/>`__ provides a managed environment for
+deploying, managing, and scaling your containerized applications using Google infrastructure. The GKE environment
+consists of multiple machines (specifically, Compute Engine instances) grouped together to form a cluster.
+
+.. contents::
+  :depth: 1
+  :local:
+
+Prerequisite Tasks
+^^^^^^^^^^^^^^^^^^
+
+.. include:: _partials/prerequisite_tasks.rst
+
+Manage GKE cluster
+^^^^^^^^^^^^^^^^^^
+
+A cluster is the foundation of GKE - all workloads run on on top of the cluster. It is made up on a cluster master
+and worker nodes. The lifecycle of the master is managed by GKE when creating or deleting a cluster.
+The worker nodes are represented as Compute Engine VM instances that GKE creates on your behalf when creating a cluster.
+
+.. _howto/operator:GKECreateClusterOperator:
+
+Create GKE cluster
+""""""""""""""""""
+
+Here is an example of a cluster definition:
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py
+    :language: python
+    :start-after: [START howto_operator_gcp_gke_create_cluster_definition]
+    :end-before: [END howto_operator_gcp_gke_create_cluster_definition]
+
+A dict object like this, or a
+:class:`~google.cloud.container_v1.types.Cluster`
+definition, is required when creating a cluster with
+:class:`~airflow.providers.google.cloud.operators.kubernetes_engine.GKECreateClusterOperator`.
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py
+    :language: python
+    :dedent: 4
+    :start-after: [START howto_operator_gke_create_cluster]
+    :end-before: [END howto_operator_gke_create_cluster]
+
+.. _howto/operator:GKEDeleteClusterOperator:
+
+Delete GKE cluster
+""""""""""""""""""
+
+To delete a cluster, use
+:class:`~airflow.providers.google.cloud.operators.kubernetes_engine.GKEDeleteClusterOperator`.
+This would also delete all the nodes allocated to the cluster.
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py
+    :language: python
+    :dedent: 4
+    :start-after: [START howto_operator_gke_delete_cluster]
+    :end-before: [END howto_operator_gke_delete_cluster]
+
+Manage workloads on a GKE cluster
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+GKE works with containerized applications, such as those created on Docker, and deploys them to run on the cluster.
+These are called workloads, and when deployed on the cluster they leverage the CPU and memory resources of the cluster
+to run effectively.
+
+.. _howto/operator:GKEStartPodOperator:
+
+Run a Pod on a GKE cluster
+""""""""""""""""""""""""""
+
+To run a Kubernetes Pod on a GKE cluster, use
+:class:`~airflow.providers.google.cloud.operators.kubernetes_engine.GKEStartPodOperator`.
+It is worth noting that this extends
+:class:`~airflow.providers.cncf.kubernetes.operators.kubernetes_pod.KubernetesPodOperator`
+so many of the same arguments can be used. We can enable the usage of :ref:`XCom <concepts:xcom>`
+on the operator:
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py
+    :language: python
+    :dedent: 4
+    :start-after: [START howto_operator_gke_start_pod_xcom]
+    :end-before: [END howto_operator_gke_start_pod_xcom]
+
+And then use it in other operators:
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py
+    :language: python
+    :dedent: 4
+    :start-after: [START howto_operator_gke_xcom_result]
+    :end-before: [END howto_operator_gke_xcom_result]
+
+Reference
+^^^^^^^^^
+
+For further information, look at:
+
+* `GKE API Documentation <https://cloud.google.com/kubernetes-engine/docs/reference/rest>`__
+* `Product Documentation <https://cloud.google.com/kubernetes-engine/docs/>`__
+* `Kubernetes Documentation <https://kubernetes.io/docs/home/>`__
+* `Kubernetes Documentation <https://kubernetes.io/docs/home/>`__

Review comment:
       [Done here](https://github.com/apache/airflow/pull/8883/commits/70c5ac9c618defca473200ce34fe760316b639fb)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] mik-laj commented on a change in pull request #8883: [AIRFLOW-6290] Create guide for GKE operators

Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #8883:
URL: https://github.com/apache/airflow/pull/8883#discussion_r426994650



##########
File path: docs/howto/operator/gcp/kubernetes_engine.rst
##########
@@ -0,0 +1,122 @@
+ .. Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+ ..   http://www.apache.org/licenses/LICENSE-2.0
+
+ .. Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+
+
+Google Kubernetes Engine Operators
+==================================
+
+`Google Kubernetes Engine (GKE) <https://cloud.google.com/kubernetes-engine/>`__ provides a managed environment for
+deploying, managing, and scaling your containerized applications using Google infrastructure. The GKE environment
+consists of multiple machines (specifically, Compute Engine instances) grouped together to form a cluster.
+
+.. contents::
+  :depth: 1
+  :local:
+
+Prerequisite Tasks
+^^^^^^^^^^^^^^^^^^
+
+.. include:: _partials/prerequisite_tasks.rst
+
+Manage GKE cluster
+^^^^^^^^^^^^^^^^^^
+
+A cluster is the foundation of GKE - all workloads run on on top of the cluster. It is made up on a cluster master
+and worker nodes. The lifecycle of the master is managed by GKE when creating or deleting a cluster.
+The worker nodes are represented as Compute Engine VM instances that GKE creates on your behalf when creating a cluster.
+
+.. _howto/operator:GKECreateClusterOperator:
+
+Create GKE cluster
+""""""""""""""""""
+
+Here is an example of a cluster definition:
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py
+    :language: python
+    :start-after: [START howto_operator_gcp_gke_create_cluster_definition]
+    :end-before: [END howto_operator_gcp_gke_create_cluster_definition]
+
+A dict object like this, or a
+:class:`~google.cloud.container_v1.types.Cluster`
+definition, is required when creating a cluster with
+:class:`~airflow.providers.google.cloud.operators.kubernetes_engine.GKECreateClusterOperator`.
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py
+    :language: python
+    :dedent: 4
+    :start-after: [START howto_operator_gke_create_cluster]
+    :end-before: [END howto_operator_gke_create_cluster]
+
+.. _howto/operator:GKEDeleteClusterOperator:
+
+Delete GKE cluster
+""""""""""""""""""
+
+To delete a cluster, use
+:class:`~airflow.providers.google.cloud.operators.kubernetes_engine.GKEDeleteClusterOperator`.
+This would also delete all the nodes allocated to the cluster.
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py
+    :language: python
+    :dedent: 4
+    :start-after: [START howto_operator_gke_delete_cluster]
+    :end-before: [END howto_operator_gke_delete_cluster]
+
+Manage workloads on a GKE cluster
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+GKE works with containerized applications, such as those created on Docker, and deploys them to run on the cluster.
+These are called workloads, and when deployed on the cluster they leverage the CPU and memory resources of the cluster
+to run effectively.
+
+.. _howto/operator:GKEStartPodOperator:
+
+Run a Pod on a GKE cluster

Review comment:
       Can you add link to this guide?
   https://airflow.readthedocs.io/en/latest/howto/operator/kubernetes.html




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] boring-cyborg[bot] commented on pull request #8883: [AIRFLOW-6290] Create guide for GKE operators

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on pull request #8883:
URL: https://github.com/apache/airflow/pull/8883#issuecomment-639264245


   Awesome work, congrats on your first merged pull request!
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] tanjinP commented on a change in pull request #8883: [AIRFLOW-6290] Create guide for GKE operators

Posted by GitBox <gi...@apache.org>.
tanjinP commented on a change in pull request #8883:
URL: https://github.com/apache/airflow/pull/8883#discussion_r427733797



##########
File path: docs/howto/operator/gcp/kubernetes_engine.rst
##########
@@ -0,0 +1,122 @@
+ .. Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+ ..   http://www.apache.org/licenses/LICENSE-2.0
+
+ .. Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+
+
+Google Kubernetes Engine Operators
+==================================
+
+`Google Kubernetes Engine (GKE) <https://cloud.google.com/kubernetes-engine/>`__ provides a managed environment for
+deploying, managing, and scaling your containerized applications using Google infrastructure. The GKE environment
+consists of multiple machines (specifically, Compute Engine instances) grouped together to form a cluster.
+
+.. contents::
+  :depth: 1
+  :local:
+
+Prerequisite Tasks
+^^^^^^^^^^^^^^^^^^
+
+.. include:: _partials/prerequisite_tasks.rst
+
+Manage GKE cluster
+^^^^^^^^^^^^^^^^^^
+
+A cluster is the foundation of GKE - all workloads run on on top of the cluster. It is made up on a cluster master
+and worker nodes. The lifecycle of the master is managed by GKE when creating or deleting a cluster.
+The worker nodes are represented as Compute Engine VM instances that GKE creates on your behalf when creating a cluster.
+
+.. _howto/operator:GKECreateClusterOperator:
+
+Create GKE cluster
+""""""""""""""""""
+
+Here is an example of a cluster definition:
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py
+    :language: python
+    :start-after: [START howto_operator_gcp_gke_create_cluster_definition]
+    :end-before: [END howto_operator_gcp_gke_create_cluster_definition]
+
+A dict object like this, or a
+:class:`~google.cloud.container_v1.types.Cluster`
+definition, is required when creating a cluster with
+:class:`~airflow.providers.google.cloud.operators.kubernetes_engine.GKECreateClusterOperator`.
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py
+    :language: python
+    :dedent: 4
+    :start-after: [START howto_operator_gke_create_cluster]
+    :end-before: [END howto_operator_gke_create_cluster]
+
+.. _howto/operator:GKEDeleteClusterOperator:
+
+Delete GKE cluster
+""""""""""""""""""
+
+To delete a cluster, use
+:class:`~airflow.providers.google.cloud.operators.kubernetes_engine.GKEDeleteClusterOperator`.
+This would also delete all the nodes allocated to the cluster.
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py
+    :language: python
+    :dedent: 4
+    :start-after: [START howto_operator_gke_delete_cluster]
+    :end-before: [END howto_operator_gke_delete_cluster]
+
+Manage workloads on a GKE cluster
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+GKE works with containerized applications, such as those created on Docker, and deploys them to run on the cluster.
+These are called workloads, and when deployed on the cluster they leverage the CPU and memory resources of the cluster
+to run effectively.
+
+.. _howto/operator:GKEStartPodOperator:
+
+Run a Pod on a GKE cluster

Review comment:
       [Think this is a duplicate of this](https://github.com/apache/airflow/pull/8883#discussion_r426998501)
   
   Specified guide as part of addressing that comment so considering this done.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] tanjinP commented on a change in pull request #8883: [AIRFLOW-6290] Create guide for GKE operators

Posted by GitBox <gi...@apache.org>.
tanjinP commented on a change in pull request #8883:
URL: https://github.com/apache/airflow/pull/8883#discussion_r427731480



##########
File path: docs/howto/operator/gcp/kubernetes_engine.rst
##########
@@ -0,0 +1,122 @@
+ .. Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+ ..   http://www.apache.org/licenses/LICENSE-2.0
+
+ .. Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+
+
+Google Kubernetes Engine Operators

Review comment:
       [Done here](https://github.com/apache/airflow/pull/8883/commits/3fe1780ae0f9503988c725c6b12b2bdf9b8e6bed)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] tanjinP commented on pull request #8883: [AIRFLOW-6290] Create guide for GKE operators

Posted by GitBox <gi...@apache.org>.
tanjinP commented on pull request #8883:
URL: https://github.com/apache/airflow/pull/8883#issuecomment-637919016


   @mik-laj - I'm good for the merge, thanks for checking in! 
   :shipit: 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] mik-laj commented on a change in pull request #8883: [AIRFLOW-6290] Create guide for GKE operators

Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #8883:
URL: https://github.com/apache/airflow/pull/8883#discussion_r426999545



##########
File path: docs/howto/operator/gcp/kubernetes_engine.rst
##########
@@ -0,0 +1,122 @@
+ .. Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+ ..   http://www.apache.org/licenses/LICENSE-2.0
+
+ .. Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+
+
+Google Kubernetes Engine Operators

Review comment:
       Can you add link to this guide in the Kubernetes Pod Operator guide? 
   https://airflow.readthedocs.io/en/latest/howto/operator/kubernetes.html
   
   ```
       .. note::
           If you use `Google Kubernetes Engine <https://cloud.google.com/kubernetes-engine/>`__, use
           :ref:`GKEStartPodOperator <howto/operator:GKEStartPodOperator>`__ operaator, which
           simplifies the authorization process.
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] mik-laj commented on a change in pull request #8883: [AIRFLOW-6290] Create guide for GKE operators

Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #8883:
URL: https://github.com/apache/airflow/pull/8883#discussion_r426998501



##########
File path: docs/howto/operator/gcp/kubernetes_engine.rst
##########
@@ -0,0 +1,122 @@
+ .. Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+ ..   http://www.apache.org/licenses/LICENSE-2.0
+
+ .. Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+
+
+Google Kubernetes Engine Operators
+==================================
+
+`Google Kubernetes Engine (GKE) <https://cloud.google.com/kubernetes-engine/>`__ provides a managed environment for
+deploying, managing, and scaling your containerized applications using Google infrastructure. The GKE environment
+consists of multiple machines (specifically, Compute Engine instances) grouped together to form a cluster.
+
+.. contents::
+  :depth: 1
+  :local:
+
+Prerequisite Tasks
+^^^^^^^^^^^^^^^^^^
+
+.. include:: _partials/prerequisite_tasks.rst
+
+Manage GKE cluster
+^^^^^^^^^^^^^^^^^^
+
+A cluster is the foundation of GKE - all workloads run on on top of the cluster. It is made up on a cluster master
+and worker nodes. The lifecycle of the master is managed by GKE when creating or deleting a cluster.
+The worker nodes are represented as Compute Engine VM instances that GKE creates on your behalf when creating a cluster.
+
+.. _howto/operator:GKECreateClusterOperator:
+
+Create GKE cluster
+""""""""""""""""""
+
+Here is an example of a cluster definition:
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py
+    :language: python
+    :start-after: [START howto_operator_gcp_gke_create_cluster_definition]
+    :end-before: [END howto_operator_gcp_gke_create_cluster_definition]
+
+A dict object like this, or a
+:class:`~google.cloud.container_v1.types.Cluster`
+definition, is required when creating a cluster with
+:class:`~airflow.providers.google.cloud.operators.kubernetes_engine.GKECreateClusterOperator`.
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py
+    :language: python
+    :dedent: 4
+    :start-after: [START howto_operator_gke_create_cluster]
+    :end-before: [END howto_operator_gke_create_cluster]
+
+.. _howto/operator:GKEDeleteClusterOperator:
+
+Delete GKE cluster
+""""""""""""""""""
+
+To delete a cluster, use
+:class:`~airflow.providers.google.cloud.operators.kubernetes_engine.GKEDeleteClusterOperator`.
+This would also delete all the nodes allocated to the cluster.
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py
+    :language: python
+    :dedent: 4
+    :start-after: [START howto_operator_gke_delete_cluster]
+    :end-before: [END howto_operator_gke_delete_cluster]
+
+Manage workloads on a GKE cluster
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+GKE works with containerized applications, such as those created on Docker, and deploys them to run on the cluster.
+These are called workloads, and when deployed on the cluster they leverage the CPU and memory resources of the cluster
+to run effectively.
+
+.. _howto/operator:GKEStartPodOperator:
+
+Run a Pod on a GKE cluster
+""""""""""""""""""""""""""
+
+To run a Kubernetes Pod on a GKE cluster, use
+:class:`~airflow.providers.google.cloud.operators.kubernetes_engine.GKEStartPodOperator`.
+It is worth noting that this extends
+:class:`~airflow.providers.cncf.kubernetes.operators.kubernetes_pod.KubernetesPodOperator`
+so many of the same arguments can be used. We can enable the usage of :ref:`XCom <concepts:xcom>`
+on the operator:

Review comment:
       ```suggestion
   You can use two operators to run pod on a  GKE cluster:
   * :class:`~airflow.providers.cncf.kubernetes.operators.kubernetes_pod.KubernetesPodOperator`
   * :class:`~airflow.providers.google.cloud.operators.kubernetes_engine.GKEStartPodOperator`
   
   ``GKEPodOperator`` extends ``KubernetesPodOperator`` to provide authorization using a Google credentials. This way you don't have to manage the `kube_config` file, but it will be generated automatically.  All Kubernetes (except `config_file`)  parameters are also valid for GKEStartPodOperator.
   
   For more information about starting pods on Airflow, please look at: :ref:`howto/operator:KubernetesPodOperator` guide.
   
   We can enable the usage of :ref:`XCom <concepts:xcom>` on the operator:
   ```
   WDYT? I would like to show a clear difference between these two operators, because it can be embarrassing. GKEPodOperator is not magic operaotr. It's only wrapper. 
   
   This is especially important for me because this information is not in the Cloud Composer documentation, and I often redirect users to this documentation if they want to use KubernetesPodOperator
   https://cloud.google.com/composer/docs/how-to/using/using-kubernetes-pod-operator
   This guide is in the Cloud Composer documentation but applies to all users.
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] mik-laj commented on pull request #8883: [AIRFLOW-6290] Create guide for GKE operators

Posted by GitBox <gi...@apache.org>.
mik-laj commented on pull request #8883:
URL: https://github.com/apache/airflow/pull/8883#issuecomment-639264379


   Thanks for the great contributions. What is your next step?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] tanjinP commented on pull request #8883: [AIRFLOW-6290] Create guide for GKE operators

Posted by GitBox <gi...@apache.org>.
tanjinP commented on pull request #8883:
URL: https://github.com/apache/airflow/pull/8883#issuecomment-639661585


   > Thanks for the great contributions. What is your next step?
   
   Thank you for the help! There are still a few other issues/PRs I'm working through so I will continue working on them.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] mik-laj commented on a change in pull request #8883: [AIRFLOW-6290] Create guide for GKE operators

Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #8883:
URL: https://github.com/apache/airflow/pull/8883#discussion_r426994046



##########
File path: docs/howto/operator/gcp/kubernetes_engine.rst
##########
@@ -0,0 +1,122 @@
+ .. Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+ ..   http://www.apache.org/licenses/LICENSE-2.0
+
+ .. Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+
+
+Google Kubernetes Engine Operators
+==================================
+
+`Google Kubernetes Engine (GKE) <https://cloud.google.com/kubernetes-engine/>`__ provides a managed environment for
+deploying, managing, and scaling your containerized applications using Google infrastructure. The GKE environment
+consists of multiple machines (specifically, Compute Engine instances) grouped together to form a cluster.
+
+.. contents::
+  :depth: 1
+  :local:
+
+Prerequisite Tasks
+^^^^^^^^^^^^^^^^^^
+
+.. include:: _partials/prerequisite_tasks.rst
+
+Manage GKE cluster
+^^^^^^^^^^^^^^^^^^
+
+A cluster is the foundation of GKE - all workloads run on on top of the cluster. It is made up on a cluster master
+and worker nodes. The lifecycle of the master is managed by GKE when creating or deleting a cluster.
+The worker nodes are represented as Compute Engine VM instances that GKE creates on your behalf when creating a cluster.
+
+.. _howto/operator:GKECreateClusterOperator:
+
+Create GKE cluster
+""""""""""""""""""
+
+Here is an example of a cluster definition:
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py
+    :language: python
+    :start-after: [START howto_operator_gcp_gke_create_cluster_definition]
+    :end-before: [END howto_operator_gcp_gke_create_cluster_definition]
+
+A dict object like this, or a
+:class:`~google.cloud.container_v1.types.Cluster`
+definition, is required when creating a cluster with
+:class:`~airflow.providers.google.cloud.operators.kubernetes_engine.GKECreateClusterOperator`.
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py
+    :language: python
+    :dedent: 4
+    :start-after: [START howto_operator_gke_create_cluster]
+    :end-before: [END howto_operator_gke_create_cluster]
+
+.. _howto/operator:GKEDeleteClusterOperator:
+
+Delete GKE cluster
+""""""""""""""""""
+
+To delete a cluster, use
+:class:`~airflow.providers.google.cloud.operators.kubernetes_engine.GKEDeleteClusterOperator`.
+This would also delete all the nodes allocated to the cluster.
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py
+    :language: python
+    :dedent: 4
+    :start-after: [START howto_operator_gke_delete_cluster]
+    :end-before: [END howto_operator_gke_delete_cluster]
+
+Manage workloads on a GKE cluster
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+GKE works with containerized applications, such as those created on Docker, and deploys them to run on the cluster.
+These are called workloads, and when deployed on the cluster they leverage the CPU and memory resources of the cluster
+to run effectively.
+
+.. _howto/operator:GKEStartPodOperator:
+
+Run a Pod on a GKE cluster
+""""""""""""""""""""""""""
+
+To run a Kubernetes Pod on a GKE cluster, use
+:class:`~airflow.providers.google.cloud.operators.kubernetes_engine.GKEStartPodOperator`.
+It is worth noting that this extends
+:class:`~airflow.providers.cncf.kubernetes.operators.kubernetes_pod.KubernetesPodOperator`
+so many of the same arguments can be used. We can enable the usage of :ref:`XCom <concepts:xcom>`
+on the operator:
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py
+    :language: python
+    :dedent: 4
+    :start-after: [START howto_operator_gke_start_pod_xcom]
+    :end-before: [END howto_operator_gke_start_pod_xcom]
+
+And then use it in other operators:
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py
+    :language: python
+    :dedent: 4
+    :start-after: [START howto_operator_gke_xcom_result]
+    :end-before: [END howto_operator_gke_xcom_result]
+
+Reference
+^^^^^^^^^
+
+For further information, look at:
+
+* `GKE API Documentation <https://cloud.google.com/kubernetes-engine/docs/reference/rest>`__
+* `Product Documentation <https://cloud.google.com/kubernetes-engine/docs/>`__
+* `Kubernetes Documentation <https://kubernetes.io/docs/home/>`__
+* `Kubernetes Documentation <https://kubernetes.io/docs/home/>`__

Review comment:
       ```suggestion
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] tanjinP commented on a change in pull request #8883: [AIRFLOW-6290] Create guide for GKE operators

Posted by GitBox <gi...@apache.org>.
tanjinP commented on a change in pull request #8883:
URL: https://github.com/apache/airflow/pull/8883#discussion_r427734075



##########
File path: docs/howto/operator/gcp/kubernetes_engine.rst
##########
@@ -0,0 +1,122 @@
+ .. Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+ ..   http://www.apache.org/licenses/LICENSE-2.0
+
+ .. Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+
+
+Google Kubernetes Engine Operators
+==================================
+
+`Google Kubernetes Engine (GKE) <https://cloud.google.com/kubernetes-engine/>`__ provides a managed environment for
+deploying, managing, and scaling your containerized applications using Google infrastructure. The GKE environment
+consists of multiple machines (specifically, Compute Engine instances) grouped together to form a cluster.
+
+.. contents::
+  :depth: 1
+  :local:
+
+Prerequisite Tasks
+^^^^^^^^^^^^^^^^^^
+
+.. include:: _partials/prerequisite_tasks.rst
+
+Manage GKE cluster
+^^^^^^^^^^^^^^^^^^
+
+A cluster is the foundation of GKE - all workloads run on on top of the cluster. It is made up on a cluster master
+and worker nodes. The lifecycle of the master is managed by GKE when creating or deleting a cluster.
+The worker nodes are represented as Compute Engine VM instances that GKE creates on your behalf when creating a cluster.
+
+.. _howto/operator:GKECreateClusterOperator:
+
+Create GKE cluster
+""""""""""""""""""
+
+Here is an example of a cluster definition:
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py
+    :language: python
+    :start-after: [START howto_operator_gcp_gke_create_cluster_definition]
+    :end-before: [END howto_operator_gcp_gke_create_cluster_definition]
+
+A dict object like this, or a
+:class:`~google.cloud.container_v1.types.Cluster`
+definition, is required when creating a cluster with
+:class:`~airflow.providers.google.cloud.operators.kubernetes_engine.GKECreateClusterOperator`.
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py
+    :language: python
+    :dedent: 4
+    :start-after: [START howto_operator_gke_create_cluster]
+    :end-before: [END howto_operator_gke_create_cluster]
+
+.. _howto/operator:GKEDeleteClusterOperator:
+
+Delete GKE cluster
+""""""""""""""""""
+
+To delete a cluster, use
+:class:`~airflow.providers.google.cloud.operators.kubernetes_engine.GKEDeleteClusterOperator`.
+This would also delete all the nodes allocated to the cluster.
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py
+    :language: python
+    :dedent: 4
+    :start-after: [START howto_operator_gke_delete_cluster]
+    :end-before: [END howto_operator_gke_delete_cluster]
+
+Manage workloads on a GKE cluster
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+GKE works with containerized applications, such as those created on Docker, and deploys them to run on the cluster.
+These are called workloads, and when deployed on the cluster they leverage the CPU and memory resources of the cluster
+to run effectively.
+
+.. _howto/operator:GKEStartPodOperator:
+
+Run a Pod on a GKE cluster
+""""""""""""""""""""""""""
+
+To run a Kubernetes Pod on a GKE cluster, use
+:class:`~airflow.providers.google.cloud.operators.kubernetes_engine.GKEStartPodOperator`.
+It is worth noting that this extends
+:class:`~airflow.providers.cncf.kubernetes.operators.kubernetes_pod.KubernetesPodOperator`
+so many of the same arguments can be used. We can enable the usage of :ref:`XCom <concepts:xcom>`
+on the operator:
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py

Review comment:
       [Done here](https://github.com/apache/airflow/pull/8883/commits/025aa4c869d2b435156ad42c5bf24135769eb93e)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] tanjinP commented on pull request #8883: [AIRFLOW-6290] Create guide for GKE operators

Posted by GitBox <gi...@apache.org>.
tanjinP commented on pull request #8883:
URL: https://github.com/apache/airflow/pull/8883#issuecomment-639237034


   > Github Action are sad. Can you fix it?
   
   All checks are happy again.
   
   Sorry for the strange number of commits, it looks like I screwed up with the rebasing. However I don't think it matters for now as long as we squash them into `master` which I believe is always done. In any case it looks good to merge 👍 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] tanjinP commented on a change in pull request #8883: [AIRFLOW-6290] Create guide for GKE operators

Posted by GitBox <gi...@apache.org>.
tanjinP commented on a change in pull request #8883:
URL: https://github.com/apache/airflow/pull/8883#discussion_r427731178



##########
File path: docs/howto/operator/gcp/kubernetes_engine.rst
##########
@@ -0,0 +1,122 @@
+ .. Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+ ..   http://www.apache.org/licenses/LICENSE-2.0
+
+ .. Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+
+
+Google Kubernetes Engine Operators
+==================================
+
+`Google Kubernetes Engine (GKE) <https://cloud.google.com/kubernetes-engine/>`__ provides a managed environment for
+deploying, managing, and scaling your containerized applications using Google infrastructure. The GKE environment
+consists of multiple machines (specifically, Compute Engine instances) grouped together to form a cluster.
+
+.. contents::
+  :depth: 1
+  :local:
+
+Prerequisite Tasks
+^^^^^^^^^^^^^^^^^^
+
+.. include:: _partials/prerequisite_tasks.rst
+
+Manage GKE cluster
+^^^^^^^^^^^^^^^^^^
+
+A cluster is the foundation of GKE - all workloads run on on top of the cluster. It is made up on a cluster master
+and worker nodes. The lifecycle of the master is managed by GKE when creating or deleting a cluster.
+The worker nodes are represented as Compute Engine VM instances that GKE creates on your behalf when creating a cluster.
+
+.. _howto/operator:GKECreateClusterOperator:
+
+Create GKE cluster
+""""""""""""""""""
+
+Here is an example of a cluster definition:
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py
+    :language: python
+    :start-after: [START howto_operator_gcp_gke_create_cluster_definition]
+    :end-before: [END howto_operator_gcp_gke_create_cluster_definition]
+
+A dict object like this, or a
+:class:`~google.cloud.container_v1.types.Cluster`
+definition, is required when creating a cluster with
+:class:`~airflow.providers.google.cloud.operators.kubernetes_engine.GKECreateClusterOperator`.
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py
+    :language: python
+    :dedent: 4
+    :start-after: [START howto_operator_gke_create_cluster]
+    :end-before: [END howto_operator_gke_create_cluster]
+
+.. _howto/operator:GKEDeleteClusterOperator:
+
+Delete GKE cluster
+""""""""""""""""""
+
+To delete a cluster, use
+:class:`~airflow.providers.google.cloud.operators.kubernetes_engine.GKEDeleteClusterOperator`.
+This would also delete all the nodes allocated to the cluster.
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py
+    :language: python
+    :dedent: 4
+    :start-after: [START howto_operator_gke_delete_cluster]
+    :end-before: [END howto_operator_gke_delete_cluster]
+
+Manage workloads on a GKE cluster
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+GKE works with containerized applications, such as those created on Docker, and deploys them to run on the cluster.
+These are called workloads, and when deployed on the cluster they leverage the CPU and memory resources of the cluster
+to run effectively.
+
+.. _howto/operator:GKEStartPodOperator:
+
+Run a Pod on a GKE cluster
+""""""""""""""""""""""""""
+
+To run a Kubernetes Pod on a GKE cluster, use
+:class:`~airflow.providers.google.cloud.operators.kubernetes_engine.GKEStartPodOperator`.
+It is worth noting that this extends
+:class:`~airflow.providers.cncf.kubernetes.operators.kubernetes_pod.KubernetesPodOperator`
+so many of the same arguments can be used. We can enable the usage of :ref:`XCom <concepts:xcom>`
+on the operator:

Review comment:
       [Agree - put a version of your suggestion here](https://github.com/apache/airflow/pull/8883/commits/3ae57e2fcaed630272e28ad7d480b6cad7c45c94)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] mik-laj commented on pull request #8883: [AIRFLOW-6290] Create guide for GKE operators

Posted by GitBox <gi...@apache.org>.
mik-laj commented on pull request #8883:
URL: https://github.com/apache/airflow/pull/8883#issuecomment-636479785


   @tanjinP It looks good. Should I merge it?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] mik-laj merged pull request #8883: [AIRFLOW-6290] Create guide for GKE operators

Posted by GitBox <gi...@apache.org>.
mik-laj merged pull request #8883:
URL: https://github.com/apache/airflow/pull/8883


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] mik-laj commented on pull request #8883: [AIRFLOW-6290] Create guide for GKE operators

Posted by GitBox <gi...@apache.org>.
mik-laj commented on pull request #8883:
URL: https://github.com/apache/airflow/pull/8883#issuecomment-638237829


   Github Action are sad. Can you fix it? 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] mik-laj commented on a change in pull request #8883: [AIRFLOW-6290] Create guide for GKE operators

Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #8883:
URL: https://github.com/apache/airflow/pull/8883#discussion_r426999884



##########
File path: docs/howto/operator/gcp/kubernetes_engine.rst
##########
@@ -0,0 +1,122 @@
+ .. Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+ ..   http://www.apache.org/licenses/LICENSE-2.0
+
+ .. Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+
+
+Google Kubernetes Engine Operators
+==================================
+
+`Google Kubernetes Engine (GKE) <https://cloud.google.com/kubernetes-engine/>`__ provides a managed environment for
+deploying, managing, and scaling your containerized applications using Google infrastructure. The GKE environment
+consists of multiple machines (specifically, Compute Engine instances) grouped together to form a cluster.
+
+.. contents::
+  :depth: 1
+  :local:
+
+Prerequisite Tasks
+^^^^^^^^^^^^^^^^^^
+
+.. include:: _partials/prerequisite_tasks.rst
+
+Manage GKE cluster
+^^^^^^^^^^^^^^^^^^
+
+A cluster is the foundation of GKE - all workloads run on on top of the cluster. It is made up on a cluster master
+and worker nodes. The lifecycle of the master is managed by GKE when creating or deleting a cluster.
+The worker nodes are represented as Compute Engine VM instances that GKE creates on your behalf when creating a cluster.
+
+.. _howto/operator:GKECreateClusterOperator:
+
+Create GKE cluster
+""""""""""""""""""
+
+Here is an example of a cluster definition:
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py
+    :language: python
+    :start-after: [START howto_operator_gcp_gke_create_cluster_definition]
+    :end-before: [END howto_operator_gcp_gke_create_cluster_definition]
+
+A dict object like this, or a
+:class:`~google.cloud.container_v1.types.Cluster`
+definition, is required when creating a cluster with
+:class:`~airflow.providers.google.cloud.operators.kubernetes_engine.GKECreateClusterOperator`.
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py
+    :language: python
+    :dedent: 4
+    :start-after: [START howto_operator_gke_create_cluster]
+    :end-before: [END howto_operator_gke_create_cluster]
+
+.. _howto/operator:GKEDeleteClusterOperator:
+
+Delete GKE cluster
+""""""""""""""""""
+
+To delete a cluster, use
+:class:`~airflow.providers.google.cloud.operators.kubernetes_engine.GKEDeleteClusterOperator`.
+This would also delete all the nodes allocated to the cluster.
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py
+    :language: python
+    :dedent: 4
+    :start-after: [START howto_operator_gke_delete_cluster]
+    :end-before: [END howto_operator_gke_delete_cluster]
+
+Manage workloads on a GKE cluster
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+GKE works with containerized applications, such as those created on Docker, and deploys them to run on the cluster.
+These are called workloads, and when deployed on the cluster they leverage the CPU and memory resources of the cluster
+to run effectively.
+
+.. _howto/operator:GKEStartPodOperator:
+
+Run a Pod on a GKE cluster
+""""""""""""""""""""""""""
+
+To run a Kubernetes Pod on a GKE cluster, use
+:class:`~airflow.providers.google.cloud.operators.kubernetes_engine.GKEStartPodOperator`.
+It is worth noting that this extends
+:class:`~airflow.providers.cncf.kubernetes.operators.kubernetes_pod.KubernetesPodOperator`
+so many of the same arguments can be used. We can enable the usage of :ref:`XCom <concepts:xcom>`
+on the operator:
+
+.. exampleinclude:: ../../../../airflow/providers/google/cloud/example_dags/example_kubernetes_engine.py

Review comment:
       Can you write a long description about data transfer via xcom? I am missing information about the /airflow/xcom/return.json file.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] tanjinP commented on a change in pull request #8883: [AIRFLOW-6290] Create guide for GKE operators

Posted by GitBox <gi...@apache.org>.
tanjinP commented on a change in pull request #8883:
URL: https://github.com/apache/airflow/pull/8883#discussion_r427733987



##########
File path: docs/howto/operator/gcp/kubernetes_engine.rst
##########
@@ -0,0 +1,122 @@
+ .. Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+ ..   http://www.apache.org/licenses/LICENSE-2.0
+
+ .. Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+
+
+Google Kubernetes Engine Operators

Review comment:
       [Follow up commit - had to correct the format](https://github.com/apache/airflow/pull/8883/commits/ded5cca846c7f39bccb707046e31770a7578064a)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org