Skip to main content
Version: 2.11


Deployments are the core resource abstraction within Ververica Platform to manage Apache Flink® jobs. A Deployment specifies the desired state of a Flink job and its configuration. Ververica Platform tracks and reports each Deployment's status and derives other resources from it. Whenever the Deployment specification is modified, Ververica Platform will ensure that the corresponding Flink job will eventually reflect this change.


Deployments tie together a sequence of deployed Flink Jobs, their accumulated state, an event log, policies to execute upgrades, and a template for creating Flink jobs. A Deployment will always be backed by zero or one active Flink job(s). Each Flink job is either executed in application mode or session mode.

On a high-level, each Deployment consists of three parts:

  • metadata Auxiliary information (e.g. name or modification timestamps) to manage the Deployment. This part is mostly user-configurable.
  • spec Configuration and behaviour of the Deployment. This part is fully user-configurable.
  • status Current status of the Deployment. This part is read-only.

The main part of a Deployment is its spec which is described in the following sections.


The spec section is the main part of each Deployment and consists of:

  • A Desired State to control the state of a Deployment.
  • A Deployment Mode that determines how to deploy the Flink job.
  • A Deployment Template that defines the necessary information needed to deploy a Flink job.
  • A Deployment Upgrades that defines which strategy to apply when upgrading a running Flink job.
  • Limits on the allowed operations Ververica Platform will perform in various scenarios.
  • When creating or modifying a Deployment, optional fields will be expanded with their default values (Deployment Defaults).

Desired State

A Deployment resource has a desired state (specified in spec.state). A Deployment's desired state can be one of the following:

  • RUNNING This indicates that the user would like to start a Flink job as defined in the spec.template section.
  • CANCELED This indicates that the user would like to terminate any currently running Flink jobs.
  • SUSPENDED This indicates that the user would like to gracefully terminate the currently running job and take a snapshot of its state.

When the desired state does not match the current state, Ververica Platform will try to perform a state transition to achieve the desired state.


The desired state will only be eventually achieved. The behavior of modifications happening concurrently to a state transition is undefined. Ververica Platform only guarantees that eventually the latest modification will be acted upon. Intermediate states may not be observed. This means that an ongoing state transition will not necessarily be immediately interrupted if the desired state changes while an operation is still ongoing.

Please refer to the Deployment Lifecycle page for more details.

Deployment Mode

Deployments can either be executed in application or session mode. This can be configured by providing one of the following attributes:

  • deploymentTargetName Execute the Deployment in application mode. The name references an existing Deployment Target in the same Namespace. In this mode, the deployed Flink job will have exclusive access to the Flink cluster.


  • sessionClusterName Execute the Deployment in session mode. The name references an existing Session Cluster resource in the same Namespace. In this mode, deployed Flink jobs share resources with other Flink jobs running on the same Flink cluster.

Please refer to the Deployment Modes page for more details.

Deployment Template

The Deployment template section specifies which Apache Flink® job job to execute and how to execute it, including its configuration.

You can think of settings in the template being directly applied to your job instances, whereas the overall Deployment specification section defines how to control these jobs over time (for instance, how to do upgrades).

Please refer to the Deployment Templates page for more details.

Deployment Upgrades

When Ververica Platform discovers that a running Flink job deviates from specified Deployment template, it will perform an upgrade of the Flink job to reconcile the situation. The behaviour of Ververica Platform is defined by an upgrade strategy (spec.upgradeStrategy) and a restore strategy (spec.restoreStrategy).

Please refer to the Deployment Upgrades page for more details.

Deployment Defaults

When a Deployment is created, default values for attributes in the spec section will be filled in as specified in the global and namespace Deployment defaults configuration. Therefore, a Deployment will be always be fully specified after it has been created.

Please refer to the Deployment Defaults page for more details.


During state transitions of a Deployment, Ververica Platform creates Job resource and potentially triggers a Savepoint.

These operations might fail due to transient reasons, like a network issue, or misconfiguration. For these cases you can limit the number of attempts that Ververica Platform tries to create a Job or Savepoint before transitioning to a FAILED state:

maxSavepointCreationAttemptsMaximum attempted Savepoints before failing.4
maxJobCreationAttemptsMaximum Job creation attempts before failing.4

Both of these limits are reset to zero after a successful Savepoint/Job creation.

The behavior on failed job creation attemps can be customized by setting the jobFailureExpirationTime duration parameter. Any attempts older than the specified value will be disregarded. If set to 0 or not specified, old attempts will be considered indefinitely.

The input string needs to conform with: “{amount}{time unit}”, e.g. “123ms”, “321 s”. Supported time units are:

DAYSd, day
HOURSh, hour
MINUTESmin, minute
SECONDSs, sec, second
MILLISECONDSms, milli, millisecond
MICROSECONDSµs, micro, microsecond
NANOSECONDSns, nano, nanosecond

Full Example

The following snippets are a complete example of a Deployment in application mode and session mode, including all optional keys and a Deployment Template.

kind: Deployment
apiVersion: v1
name: top-speed-windowing-example
displayName: TopSpeedWindowing Example
env: testing
state: RUNNING
deploymentTargetName: default
maxSavepointCreationAttempts: 4
maxJobCreationAttempts: 4
flink.queryable-state.enabled: 'false' 'false'
kind: jar
- s3://mybucket/some_additional_library.jar
- s3://mybucket/some_additional_resources
mainArgs: --windowSize 10 --windowUnit minutes
entryClass: org.apache.flink.streaming.examples.windowing.TopSpeedWindowing
flinkVersion: 1.12
flinkImageRepository: flink
flinkImageTag: 1.12.7-stream2-scala_2.12
execution.checkpointing.externalized-checkpoint-retention: RETAIN_ON_CANCELLATION
execution.checkpointing.interval: 10s
high-availability: vvp-kubernetes
state.backend: filesystem
parallelism: 2
numberOfTaskManagers: 2
cpu: 1
memory: 1g
cpu: 1.0
memory: 2g
loggingProfile: default
"": INFO
org.apache.flink.streaming.examples: DEBUG
- name: KEY
value: VALUE