An application to execute Flink SQL jobs.
-
Build application
mvn package
-
Build an image
minikube image build flink-sql-runner -t flink-sql-runner:latest
-
Create a
flink
namespace:kubectl create namespace flink
-
Follow the steps in Deploying the operator section of the Flink Kubernetes Operator's Quick Start.
-
Install the required RBAC rules for Flink Job:
kubectl create -f install/
-
Create a Flink job using the FlinkDeployment.yaml example. Supply your SQL statements to the job by replacing
<SQL_STATEMENTS>
. You can use Kubernetes secrets with Flink SQL Runner, to provide security credentials to Flink job for connecting to the source or the target systems. Secrets can be directly templated in the SQL statements with the following pattern:{{secret:<NAMESPACE>/<SECRET NAME>/<DATA KEY>}}
If running with the local image built in step 2, ensure that the FlinkDeployment's image is updated.
-
Start a Flink job:
kubectl create example/FlinkDeployment.yaml -n flink