This guide walks through how to deploy and run a simple spring-cloud-task application on Kubernetes by using Spring Cloud Data Flow.
We deploy the sample billsetuptask application to Kubernetes.
For this guide, we need a running Kubernetes cluster with Spring Cloud Data Flow deployed. For this example, we use
When SCDF is running on Kubernetes, you should see the
scdf-server pod in a
Running state and the associated service created.
You can use the following command (shown with typical output) to see the
$ kubectl get all -l app=scdf-server NAME READY STATUS RESTARTS AGE pod/scdf-server-65789665d-79hrz 1/1 Running 0 5m39s NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/scdf-server LoadBalancer 10.109.181.91 <pending> 80:30403/TCP 5m39s NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/scdf-server 1/1 1 1 5m39s NAME DESIRED CURRENT READY AGE replicaset.apps/scdf-server-65789665d 1 1 1 5m39s
NOTE: On Minikube,
EXTRNAL-IP = <pending> for the
service is normal.
We build the
billsetuptask app, which is configured with the jib maven plugin. To do so:
- Clone or download the task samples git repo and navigate to the
Run the following commands to build the docker image:
$ eval $(minikube docker-env) $ ./mvnw clean package jib:dockerBuild
Those commands add the image to the
Verify its presence by finding
springcloudtask/billsetuptaskin the list of images provided by running the following command:
$ docker images
We use the
Data Flow Dashboard to set up and launch the
First, we need to get the SCDF Server URL, which we can do with the following command (the listing includes the output):
$ minikube service --url scdf-server http://192.168.99.100:30403
Now you can follow the instructions to register and launch a task application using Data Flow, using the docker image we just built to register the application.