spring-cloud-dataflow

running maven task on spring cloud data flow in kubernetes platform


I'm trying to setup spring cloud data flow to be able to run maven tasks in kubernetes cluster. I was able to register repository in the SCDF server, and register application with maven://group:artifact:version but when I try to launch the corresponding task SCDF creates pod with

    image: maven://....

so kubernetes says that image name is incorrect.

Is there a way to make SCDF use jars from maven repo in kubernetes platform? Or does kubernetes platform supports only docker:// type tasks?

I tried to check if docker type task works and it is. I would like to have maven type tasks to be working as well


Solution

  • Spring Cloud Data Flow uses Spring Cloud Deployer for Kubernetes and it only deploys container images. If you have maven coordinates for a Spring Boot JAR and you want to create a container the easiest is to use Paketo pack cli.

    Then use:

    pack build \
        --path <path-to-jar> \
        --builder gcr.io/paketo-buildpacks/builder:base <container-repository>/<container-image>:<image-tag>