jpyen opened a new issue #14167: URL: https://github.com/apache/airflow/issues/14167
**Apache Airflow version**: 2.0.1 **Kubernetes version**: 1.18 **What happened**: Tasks launched as pods inside a k8s cluster will not have unique names, if a pod_template is used. **What you expected to happen**: Tasks launched by KubernetesPodOperator should have unique pod-names. This works for tasks solely defined by the KubernetesPodOperator object. However, this does not apply when a 'pod_template_file' is used. I was trying to define the pod_name additionally to the template_file by the KubernetesOperator attribute "name", but this is prohibited [here](https://github.com/apache/airflow/blob/9034f277ef935df98b63963c824ba71e0dcd92c7/airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py#L413) , hence a non-unique pod-name based on the template file. I don't see a good reason why pod names should be non unique when a pod_template is utilized. **How to reproduce it**: Create a new task with KubernetesPodOperator and make use of the 'pod_template_file' attribute. **Anything else we need to know**: -- 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: [email protected]
