Skip to main content

PodTemplate

Custom PodTemplate specification for a Task.

Attributes

AttributeTypeDescription
pod_specOptional["V1PodSpec"]Custom PodTemplate specification for a Task.
primary_container_namestrThe name of the primary container within the pod.
labelsOptional[Dict[str, str]]Labels to apply to the Kubernetes pod.
annotationsOptional[Dict[str, str]]Annotations to apply to the Kubernetes pod.

Methods


to_k8s_pod()

@classmethod
def to_k8s_pod() - > K8sPod

Converts the PodTemplate object into a K8sPod object, which is a Flyte-specific representation of a Kubernetes Pod. This method is used to generate the Kubernetes Pod configuration based on the template's specifications.

Returns

TypeDescription
K8sPodA K8sPod object representing the Kubernetes Pod configuration derived from the PodTemplate.