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


airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py
pod_template = self.full_pod_spec
        else:
            pod_template = k8s.V1Pod(metadata=k8s.V1ObjectMeta(name="name"))
        pod = k8s.V1Pod(
            api_version="v1",
            kind="Pod",
            metadata=k8s.V1ObjectMeta(
                namespace=self.namespace,
                labels=self.labels,
                name=PodGenerator.make_unique_pod_id(self.name),
                annotations=self.annotations,
            ),
            spec=k8s.V1PodSpec(
                node_selector=self.node_selector,
                affinity=self.affinity,
                tolerations=self.tolerations,
                init_containers=self.init_containers,
                containers=[
                    k8s.V1Container(
                        image=self.image,
                        name="base",
                        command=self.cmds,
                        ports=self.ports,
                        image_pull_policy=self.image_pull_policy,
                        resources=self.k8s_resources,
                        volume_mounts=self.volume_mounts,
                        args=self.arguments,
                        env=self.env_vars,
                        env_from=self.env_from,
                    )