Hi, Flyte support team, I am trying to deploy flyt...
# flyte-support
b
Hi, Flyte support team, I am trying to deploy flyte-binary following the this tutorial https://github.com/davidmirror-ops/flyte-the-hard-way. It works on my local machine but my organization cluster (openshift) had a strict permission policy that forbids creating new namespaces and cluster roles. I tried to deploy in existing namespaces, but by default flight-binary will create 3 namespaces and spawn task pods in them. Is there a way to override this before and have task pods spawned in a specific namespace?
s
if you use
helm install -n your-namespace
, the -n parameter allows you to specify the namespace where things will be deployed to. I've only deployed flyte core, but I assume this would work for flyte binary as well
b
@shy-morning-17240 Thanks for reply. Yeah, I did use
helm install -n mynamespace
to deploy flyte-binary. But then, when I checked all the namespaces, I found
flytesnacks-development
,
flytesnacks-staging
, and
flytesnacks-production
namespaces are created as well, which will be impossible for my organization environment. I also tried to add configurations in binary-values.yaml to avoid creating these three name spaces, but then I cannot run workflow remotely because the flyte-propeller always look for
flytesnacks-development
to spawn task pods. I want to know if there is a way spawn all the task pods in my existing namespace instead of default “flytesnacks-development”
This is a screenshot of what I meant the namespaces created by
flyte-binary
, and the tasks are run under this namespace
And I tried to add these lines in the
values.yaml
to avoid creating new namesapces, I can’t run a workflow remotely:
s
Ah, I see what you mean! Yeah, I don't think there's a way around that, since every flyte project you create to run code inside flyte (e.g. flytesnacks, flyteexamples, some-internal-project) creates its own namespace
look into vclusters and just deploy a kubernetes vcluster in an existing namespace where you have access to as a kubernetes user
vclusters are exactly that, virtual kubernetes clusters that run on top of a real cluster but are isolated to an extent from the rest of the cluster, so you (the creator), has total control over the vcluster like an admin, and you can still create ingresses to outside world if needed
there are a few caveats related to the ingresses, but it works nicely to setup and run flyte with little to no help from actual cluster admins
b
@shy-morning-17240 Thanks a lot! Vcluster is actually an interesting solution I could try.
m
You can also make a
PodTemplate
that makes flyte pods inside a specific namespace e.g.
Copy code
apiVersion: v1
kind: PodTemplate
metadata:
  name: flyte-pod-template
  namespace: flyte
template:
  metadata:
    labels:
      pod-template-name: flyte-pod-template
      pod-template-namespace: YOUR_NAMESPACE_HERE
  spec:
    containers:
      - name: default
        image: <<http://docker.io/rwgrim/docker-noop%7Cdocker.io/rwgrim/docker-noop>>
then in helm
values.yaml
you specify
Copy code
configuration:
  inline:
    plugins:
      k8s:
        default-pod-template-name:   flyte-pod-template
or i think you can use
namespace_mapping
too:
Copy code
configuration:
  inline:
    namespace_mapping:
      template: "YOUR_NAMESPACE_HERE"
b
@mammoth-mouse-1111
namespace_mapping
under
configuration.inline
actually works! The task pods are created under my existing namespace! Thank you very much!
c
thank you @mammoth-mouse-1111 and @shy-morning-17240!