Hi, we would like to create flyte workflow from a ...
# flyte-support
a
Hi, we would like to create flyte workflow from a k8s job, and later trigger the workflow with some parameters from another k8s job. Based on the ImageSpec document, it seems that the image build and push is done by flytekit on the local environment, which requires docker daemon. By default, there is no docker daemon running in my k8s cluster nodes. We used to use kaniko for docker build and push in the cluster, but I think it is not integrated with flyte or flytekit directly. What would be your recommendation for this scenario? How to build flyte workflow from a k8s cluster?
a
I think @ripe-battery-86055 has worked on a plugin to integrate K8s Jobs
If Kaniko builds an OCI-compliant image, Flyte should be able to use it
a
Thanks, @average-finland-92144. According to the ImageSpec document, it seems that flyte uses
flytekit
client to build the docker images defined in the ImageSpec in the local environment where the flyte client is executed. And this local environment requires docker daemon. In our scenario, we would like to do an integration between flyte and our application. Our application is running on a k8s cluster, and we want our users to upload the python files that contain flyte imagespec, tasks, and workflows to our application, and we use a k8s job to call flyte client to build docker images and create flyte workflow. K8s cluster normally does not have docker daemon installed, so it does not fulfill the requirement for running
flytectl
or
pyflyte
. So do you have any recommendation on this kind of integration? Is the
envd
plugin suitable for my scenario? It seems that
buildkit
is included in the sandbox deployment. Is it also included in single-binary or core? If it is included in the cluster version of flyte, we should be able to use
envd
to access the
buildkit
to build and push images in a k8s job, right? Assume we can deploy flyte and our application in the same k8s cluster.
Screenshot 2024-10-29 at 13.38.26.png
a
I'm thinking what if you don't use ImageSpec? I mean, if you let Kaniko build the image and Flyte just consumes it
a
Thanks for the reminder, David. This looks a good option to me, and perhaps we can use kaniko to build images and use multiple images in workflow for my integration purpose. Does flyte provide any python library client which is equivalent to the
pyflyte run
command?
Copy code
pyflyte run --remote --image mindmeld="ghcr.io/flyteorg/flytecookbook:core-latest" --image borebuster="ghcr.io/flyteorg/flytekit:py3.9-latest" multi_images.py multi_images_wf