Hi Guys still new to prefect 3 and I was wondering...
# prefect-ui
h
Hi Guys still new to prefect 3 and I was wondering if there is a way for me to create a k8s secret and then link that to the job to be able to get environemnt variables from ?
g
I’ve found that in order to access environment variables from the k8s job, you need to add the env vars / secrets / config map to the base_job_template.
h
Got it but where do I store the base_job_template with respect to the repository where my flow code lives ?
g
You’ll want to manage the base job template and config map in helm. Your flow code will spin up on a k8s job from a work pool that contains the aforementioned BJT/CM. At least, this is my understanding of the k8s work pools + k8s job intended design.
n
you can put k8s secrets in your
env
on your work pool, or deployment / flow run overrides (i.e. your helm chart doesnt need to know about this) https://github.com/zzstoatzz/prefect-pack/blob/main/prefect.yaml#L52-L65
h
Got it. Thank you both for your guidance on this. I appreciate the help guys!