Hello.

Kubernetes generates a unique pod name.
https://github.com/apache/airflow/blob/736a62f824d9062b52983633528e58c445d8cc56/airflow/kubernetes/pod_generator.py#L434-L458
It would be great if the pod name was available in Airflow after completing the task, so that, for example, we could use it to add [extra links](http://airflow.apache.org/docs/apache-airflow/stable/howto/define_extra_link.html) or use it as an argument in downstream tasks. To do this, we should save this name in XCOM table.

The operator for BigQuery works in a similar way.
https://github.com/apache/airflow/blob/736a62f824d9062b52983633528e58c445d8cc56/airflow/providers/google/cloud/operators/bigquery.py#L730
Thanks to this, we have links to the BigQuery console.
https://github.com/apache/airflow/blob/736a62f824d9062b52983633528e58c445d8cc56/airflow/providers/google/cloud/operators/bigquery.py#L600-L605
https://github.com/apache/airflow/blob/736a62f824d9062b52983633528e58c445d8cc56/airflow/providers/google/cloud/operators/bigquery.py#L57-L86

Best regards,
Kamil Breguła


tests/providers/cncf/kubernetes/operators/test_kubernetes_pod.py
assert pod.spec.containers[0].image == "ubuntu:16.04"
            assert pod.spec.containers[0].command == ["something"]
            
            image = "some.custom.image:andtag"
            name_base = "world"
            k = KubernetesPodOperator(
                task_id="task",
                pod_template_file=tpl_file.name,
                name=name_base,
                image=image,
                labels={"hello": "world"},
            )
            pod = self.run_pod(k)
            
            assert pod.metadata.name.startswith(name_base)
            assert pod.metadata.name != name_base
            assert pod.spec.containers[0].image == image
            
            
            assert pod.metadata.labels == {
                "foo": "bar",
                "hello": "world",
                "dag_id": "dag",
                "kubernetes_pod_operator": "True",
                "task_id": "task",
                "try_number": "1",
                "airflow_version": mock.ANY,
                "execution_date": mock.ANY,
            }
    def test_describes_pod_on_failure(self):