Skip to main content
Version: 2.13

Deployment Targets

DeploymentTargets correspond to different Kubernetes namespaces in the same Kubernetes cluster that Ververica Platform runs in.

Once a DeploymentTarget resource is created, you can reference it in Deployment in application mode or SessionCluster resources. Note that a created DeploymentTarget is immutable.

The DeploymentTarget specification (.spec) is immutable, but updates to metadata are allowed.

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

Endpoints

The following endpoints are available for interacting with DeploymentTargets:

URIMethodDescription
/api/v1/namespaces/{namespace}/deployment-targetsGETList all DeploymentTargets in the namespace
/api/v1/namespaces/{namespace}/deployment-targetsPOSTCreate the DeploymentTarget specified in the request body
/api/v1/namespaces/{namespace}/deployment-targets/{name}GETGet a DeploymentTarget by name
/api/v1/namespaces/{namespace}/deployment-targets/{name}PUTUpsert a DeploymentTarget by name
/api/v1/namespaces/{namespace}/deployment-targets/{name}DELETEDelete a DeploymentTarget by name

Specification

Example

kind: DeploymentTarget
apiVersion: v1
metadata:
name: myDeploymentTarget
namespace: default
labels:
labelName: labelValue
annotations:
annotationName: annotationValue
spec:
kubernetes:
namespace: staging

Kubernetes

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

It is required that Ververica Platform's ServiceAccount has proper access rights that allow managing Apache 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.

caution

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 in application mode or SessionCluster will have the following Kubernetes resource labels.

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.