Deployment Targets

Apache Flink® Deployments reference a Deployment Target, which corresponds to different Kubernetes namespaces in the same Kubernetes cluster, that Ververica Platform runs in.

Additionally, the DeploymentTarget resource can provide a patch set that is applied to all Deployment resources that reference it.

Once a DeploymentTarget resource is created, you can reference it in Deployment resources. Note that a created DeploymentTarget are immutable.

Deleting a DeploymentTarget is only possible if it is not referenced by any Deployment.

Specification

Kubernetes

This is a required attribute that defines which Kubernetes namespace to use for Flink deployments. The spec.kubernetes.namespace field is an optional String. If not set, Ververica Platform will use the same Kubernetes namespace it is running in.

kind: DeploymentTarget
spec:
  kubernetes:
    namespace: staging

It is required that Ververica Platform’s ServiceAccount has proper access rights that allow managing Flink clusters in other Kubernetes namespaces.

For convenience, you can create the necessary Kubernetes Roles and RoleBindings via the Helm charts using the rbac.additionalNamespaces value.

Warning

It is recommended to run Ververica Platform and the Flink Jobs managed by Ververica Platform in separate Kubernetes Namespaces.

Resource Labels

The Kubernetes resources created for a Deployment or SessionCluster will have the following Kubernetes resource labels.

Deployments
app
flink-job
system
ververica-platform
vvpNamespace
Namespace of the corresponding Deployment resource (metadata.namespace).
deploymentId
ID of the corresponding Deployment resource (metadata.id).
deploymentName
Name of the corresponding Deployment resource (metadata.name). The name will be reformatted to fulfill Kubernetes label value requirements, e.g. My Deployment Name will become my-deployment-name.
jobId
ID of the Job resource (metadata.id) that corresponds to the execution of the Deployment.
SessionClusters
app
flink-session-cluster
system
ververica-platform
vvpNamespace
Namespace of the corresponding SessionCluster resource (metadata.namespace).
sessionClusterId
ID of the corresponding SessionCluster resource (metadata.id).
sessionClusterName
Name of the corresponding SessionCluster resource (metadata.name).