[8970] Improve KubernetesPodOperator guide#9079
[8970] Improve KubernetesPodOperator guide#9079mik-laj merged 11 commits intoapache:masterfrom tanjinP:issue-8970-improve-k8spodop-guide
Conversation
| The :class:`~airflow.providers.cncf.kubernetes.operators.kubernetes_pod.KubernetesPodOperator`: | ||
| The :class:`~airflow.providers.cncf.kubernetes.operators.kubernetes_pod.KubernetesPodOperator` allows | ||
| you to create and run Pods on a Kubernetes cluster. | ||
|
|
There was a problem hiding this comment.
| .. contents:: | |
| :depth: 1 | |
| :local: |
|
Very good direction. We just need it. |
|
@tanjinP Have you encountered any difficulties? Can I help you? |
…e-k8spodop-guide # Conflicts: # docs/howto/operator/kubernetes.rst
…e-k8spodop-guide # Conflicts: # docs/howto/operator/kubernetes.rst
docs/howto/operator/kubernetes.rst
Outdated
There was a problem hiding this comment.
The KubernetesPodOperato uses the Kubernetes API to launch a pod in a Kubernetes cluster. By supplying an image URL and a bash command, the operator uses the Kube Python Client...
docs/howto/operator/kubernetes.rst
Outdated
There was a problem hiding this comment.
Users can specify a kubeconfig file using the config_file parameter, otherwise the operator will default to ~/.kube/config
|
|
||
| The ``KubernetesPodOperator`` enables task-level resource configuration and is optimal for custom Python | ||
| dependencies that are not available through the public PyPI repository. | ||
| Ultimately, it allows Airflow to act a job orchestrator - no matter the language those jobs are written in. |
There was a problem hiding this comment.
The ```KubernetesPodOperatoralso allows users to supply a template yaml file using thepod_template_file`` configuration.
docs/howto/operator/kubernetes.rst
Outdated
There was a problem hiding this comment.
To pull images from a private registry*
docs/howto/operator/kubernetes.rst
Outdated
There was a problem hiding this comment.
Yikes - this was a good one.
|
Looks like some static checks failing, will address |
|
I would be happy to add information that Kubernetes Executor is not required for Kubernetes Pod Operator. Two sentences about the behavior of KubernetesPodOperator when installing into clusters would also be helpful, but we can add them in a separate change. My opinion is based on the Slack discussion. This is an important feedback on what users are looking for in the documentation. |
| .. note:: | ||
| If you use `Google Kubernetes Engine <https://cloud.google.com/kubernetes-engine/>`__, consider | ||
| using the | ||
| :ref:`GKEStartPodOperator <howto/operator:GKEStartPodOperator>` operator as it |
There was a problem hiding this comment.
This link does currently appear to be working. should it be updated?
There was a problem hiding this comment.
Some description that GKEStartPodOperator extends KubernetesPodOperator and that therefore the rest of this documentation is still applicable would be really helpful.
There was a problem hiding this comment.
This link works. However, it is not available in the source code, but works in the HTML code generated. Please look at: https://airflow.readthedocs.io/en/latest/howto/operator/kubernetes.html
Mentioned this as a note here
Not sure what you mean here - what do you mean by |

Addresses some of #8970
Currently have an outline of the items mentioned (
docs/howto/operator/kubernetes.rst) in the issue and looking for feedback if this is a good approach to take to build out this documentation.There are 5 subheadings, we mention what the content will be, if it includes a code example (currently there are none), and potential references to link (will avoid the blog/guides in favor of official documentation, like Kubernetes)
Make sure to mark the boxes below before creating PR: [x]
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.
Read the Pull Request Guidelines for more information.