PodTemplate
Custom PodTemplate specification for a Task.
Attributes
| Attribute | Type | Description |
|---|---|---|
| pod_spec | Optional["V1PodSpec"] | Custom PodTemplate specification for a Task. |
| primary_container_name | str | The name of the primary container within the pod. |
| labels | Optional[Dict[str, str]] | Labels to apply to the Kubernetes pod. |
| annotations | Optional[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
| Type | Description |
|---|---|
K8sPod | A K8sPod object representing the Kubernetes Pod configuration derived from the PodTemplate. |