Artifacts
On this page
The artifact section of a Deployment specifies which Flink code to execute. Currently, there are two supported types of artifacts, JARs and SQL scripts.
JAR Artifacts
Apache Flink® jobs must be packaged as a JAR (../packaging-your-application.mdx) before they can be submitted for execution by Flink. After packaging, you can reference JARs in the artifact section of your Deployment configuration:
1kind: Deployment
2spec:
3 template:
4 spec:
5 artifact:
6 kind: jar
7 jarUri: https://repo1.maven.org/maven2/org/apache/flink/flink-examples-streaming{scalaSuffix}/{flinkRelease}/flink-examples-streaming{scalaSuffix}-{flinkRelease}-TopSpeedWindowing.jar
8 additionalDependencies:
9 - s3://bucket/object
10 entryClass: org.apache.flink.streaming.examples.windowing.TopSpeedWindowing
11 mainArgs: --windowSize 10 --windowUnit minutes
12 flinkVersion: {flinkVersion}
13 flinkImageRegistry: registry.ververica.com
14 flinkImageRepository: v{shortVersion}/flink
15 flinkImageTag: {ververicaFlinkRelease}-scala_2.12where:
For Flink 1.18 and later the Scala suffix _2.12 was removed from the Maven coordinates for example JARs used in these templates.
The pattern below works for all supported versions.
Template variables
1{flinkRelease} // e.g. 1.17.2 or 1.18.0
2{scalaSuffix} // "_2.12" for ≤1.17, "" for ≥1.18* ``jarUri`` (required): The URI of the JAR to execute. Please refer to the Artifact Management page for details on which URI schemes are supported.
additionalDependencies(optional): A list of additional dependencies that should be downloaded and made part of the user code classpath of the Flink job. Each additional dependency is provided as a URI.entryClass(optional): The class to execute. Required, if no Main-Class manifest entry manifest present. The main method of the entry class should setup a FlinkExecutionEnvironmente.g. StreamExecutionEnvironment and execute the Flink job.mainArgs(optional): Arguments that are fed into the main method of the entry point class. The argument is a single string that is tokenized before being provided to the entry class. Single parameters containing whitespace can be represented by wrapping them in single or double quotes. Double quoted values are escaped by means of backslashes, e.g.--json "{\"key\": \"value\"}"results in two parameters--jsonand{"key": "value"}.flinkVersion(optional): Themajor.minorversion of the Flink version. If not provided, it will fall back to the configured default of your Ververica Platform installation. Note that the provided version must match the actual version deployed at runtime (as determined by the Flink docker image). Therefore, please make sure to update or clearflinkImageTagwhenever you updateflinkVersion.flinkImageRegistry(optional): The Docker image registry to use for the Flink image. If not provided, it will fall back to the configured default of your Ververica Platform installation.flinkImageRepository(optional): The Docker image repository to use for the Flink image. If not provided, it will fall back to the configured default of your Ververica Platform installation.flinkImageTag(optional): The Docker image tag to use for the Flink image. If not provided, it will fall back to the configured default of your Ververica Platform installation for the givenflinkVersion.
In order to specify an image by digest, prefix the provided value with @, e.g. @sha256:2d034c...54f765.