Skip to content

[V2] Support tasks pods scheduled in separate k8s namespace #8051

Open

Description

@popojk

Issue

In v1, the tasks will be scheduled in separate namespace with name <project>-<domain>. We can do the same in v2 runtime

What's expected

  1. When the user created a run, the BE should check if the <project>-<domain> namespace existed. If not, create one.
  2. Our secret manager inject secret into task pods with k8s ENV reference, so that the secret value will not shown in the pod spec. However, one limitation is that the task pod must be in the same namespace in order to read that secret value. Once we support multi namespace/cluster, we will have to find a way to solve this issue. Maybe we could have a separate background service that sync the secrets in parent namespace to child namespaces. This is an open question.

Activity

  1. runllm commented on Sep 17, 2026

    @runllm

    It seems likely that Flyte v2 supports scheduling task pods in separate Kubernetes namespaces using a namespace mapping template, typically <project>-<domain>. This mapping is controlled by the namespace_mapping.template value in your Helm configuration, and the system will create the namespace if it does not exist when a run is created. All relevant Flyte components (clusterresourcesync, propeller, operator, executor, flyteadmin) use this mapping to resolve the target namespace for task execution. See the details in namespace mapping documentation.

    Regarding secrets, Flyte's secret injection relies on Kubernetes secrets being present in the same namespace as the task pod. If you use multiple namespaces, you must ensure secrets are synced to each relevant namespace, as Flyte does not natively sync secrets across namespaces. The documentation suggests this is a known limitation and hints at the need for a background service or manual process to synchronize secrets between namespaces (source). Would you like more detail on how to implement secret synchronization or namespace management?

    Sources:


    This is an AI-generated response and your feedback is appreciated! Please leave a 👍 if this is helpful and 👎 if it is not.

    Mention @Herald to ask follow-up questions. See runllm.com for more!

  2. self-assigned this
    on Sep 21, 2026
  3. sr425 commented on Oct 15, 2026

    @sr425

    @Sovietaced are there any updates on the topic? Or if not, would there be the option to contribute to fixing this?

  4. Sovietaced commented on Oct 15, 2026

    @Sovietaced
    Member

    @Sovietaced are there any updates on the topic? Or if not, would there be the option to contribute to fixing this?

    Go for it

  5. madiyar-wayve commented on Oct 22, 2026

    @madiyar-wayve

    Hi, I took a look at implementing this. Initially trying to scope pod lists to project namespace #8215. Let me know if the PR makes sense 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions