Streamtime runs Flink on a Kubernetes fleet and keeps it monitored and up to date. Apache Flink runs in a Job Workspace (session mode): a shared cluster, sized up to Max Flink Units, that you submit jobs to. Each job claims Flink Units from it. Apache Flink does not offer a single-job cluster.
Confluent Manager for Flink keeps its single-job cluster (application mode): the cluster runs one job, from an application JAR or a registered Flink project version, and is sized in Flink Units.
Key Features
Open-source Apache Flink or Confluent Flink, chosen as the Provider.
Sized in Flink Units, with an Optimization Goal (Cost, Balanced or Performance). Streamtime derives the rest from the Flink Units: each TaskManager gets min(Flink Units, 4) slots and the cluster gets enough TaskManagers to cover them. A job runs as wide as the Flink Units it was given. These numbers are provisional. What a Flink Unit is, and what it takes from the fleet: Capacity units.
RocksDB state in every Job Workspace.
Checkpoints and savepoints on by default. On a kind or BYOK fleet they go to the fleet’s RustFS, in the flink bucket under <organization>/<cluster>, and the last 3 checkpoints are kept. A job that stops or restarts resumes from them. Deleting the cluster removes its folder. The fleet’s RustFS holds one shared credential for all clusters, so any cluster on the fleet can read another’s state. Cloud fleets have no durable store yet and keep state on the pods’ temporary disk, so Keep running state and Resume from the latest checkpoint are refused there.
State handling per job: Start fresh (stateless), Keep running state (savepoint) or Resume from the latest checkpoint (last-state).
Flink Web UI on every deployment, with metrics, logs and alerts.
Flink projects: CI registers each build from your own artifact store as a version, and deployments run it by version. See Flink projects.
Settings
Provider: Apache Flink or Confluent Manager for Flink.
Basic Configuration: Identifier, Description, and Max Flink Units (Job Workspace) or Flink Units (Confluent single-job cluster) with the Optimization Goal. For Apache Flink, Jobs run in: Java (the default) or Python. Python installs the image that runs PyFlink jobs and needs no project to exist first. A Python release is refused on a Java workspace, and the language cannot change once the workspace has jobs. Confluent Manager for Flink also asks for the State Backend Tier.
Fleet Selection: the fleet to run on, or let Streamtime choose one.
Advanced Configuration: the Version, to upgrade or for local testing. Confluent Manager for Flink also asks for the application JAR (or a project version), entry class and arguments, and its license. Task slots, TaskManager count, security, Web UI, savepoint and checkpoint settings are not asked for; the API still accepts them as overrides.
Before you start
A fleet in Healthy state with room for the Flink workload (see Fleet management).
For the API: an access token in STREAMTIME_TOKEN and your organization identifier in place of <org>. Replace api.example.com with your Streamtime API address.
packagemainimport("bytes""crypto/rand""encoding/hex""encoding/json""net/http""os")constapi="https://api.example.com/organizations/<org>"// newKey returns a random idempotency key.funcnewKey()string{b:=make([]byte,16)rand.Read(b)returnhex.EncodeToString(b)}// call sends one request with the access token and a JSON body (or none).// An optional idempotency key is sent as the Idempotency-Key header.funccall(method,pathstring,bodyany,idempotencyKey...string)(*http.Response,error){varbufbytes.Bufferifbody!=nil{iferr:=json.NewEncoder(&buf).Encode(body);err!=nil{returnnil,err}}req,err:=http.NewRequest(method,api+path,&buf)iferr!=nil{returnnil,err}req.Header.Set("Authorization","Bearer "+os.Getenv("STREAMTIME_TOKEN"))req.Header.Set("Content-Type","application/json")iflen(idempotencyKey)>0{req.Header.Set("Idempotency-Key",idempotencyKey[0])}returnhttp.DefaultClient.Do(req)}
Saving a Flink resource and provisioning it are separate steps in the API: create or change it, then reconcile its new generation. The reconcile returns 202 with the operation it started; the same Idempotency-Key returns that operation again, and a 409 means the generation is out of date.
Create a Flink deployment
In the sidebar, select Flink, then Create Flink.
Provider: choose Apache Flink or Confluent Manager for Flink.
Basic Configuration: enter the Identifier, choose Jobs run in (Apache Flink), and set Max Flink Units and the Optimization Goal.
Fleet Selection: choose the fleet.
Advanced Configuration: change the Version only if you need to.
Create it. It shows Pending, then Provisioning, then Healthy.
# 1. Save a session cluster. The response includes "generation".
curl -X POST "$API/flink/"\-H"Authorization: Bearer $STREAMTIME_TOKEN"\-H"Content-Type: application/json"\-d'{
"identifier": "analytics",
"mode": "session",
"provider": "open-source",
"max_flink_units": 8,
"advanced_configuration": {"optimization_goal": "Balanced", "state_tier": "Light"}
}'# 2. Provision it
curl -X POST "$API/flink/analytics/reconcile/"\-H"Authorization: Bearer $STREAMTIME_TOKEN"\-H"Content-Type: application/json"\-H"Idempotency-Key: $(uuidgen)"\-d'{"generation": 1}'
identifier and mode are required. Apache Flink takes "mode": "session" and max_flink_units; "mode": "application" is refused for it. For Confluent Manager for Flink ("provider": "cmf"), send "mode": "application", flink_units and either advanced_configuration.application_jar or project_version ({"project": "<project>", "version": "<version>"}). Sizing, state backend and checkpoint locations are Streamtime’s defaults; the rest of advanced_configuration is optional. Add "fleet": "<fleet>" to choose the fleet.
terraform apply saves the deployment, starts provisioning it and waits until it is ready, the same two steps as the API. Leave out fleet to let Streamtime choose one. Apache Flink takes mode = "session" and max_flink_units. For Confluent Manager for Flink, set flink_provider = "cmf", mode = "application" and flink_units, and either the JAR in advanced_configuration or a project version:
resource"streamtime_flink""shared"{identifier="shared"flink_provider="open-source"mode="session"fleet="<fleet>"max_flink_units=8}# A project runs in a Job Workspace and reserves Flink Units on it.# The build tool follows the runtime (Java: Maven, Scala: sbt, Python: pip).resource"streamtime_flink_project""etl"{identifier="etl"name="ETL jobs"runtime="java"cluster=streamtime_flink.shared.identifierflink_unit_budget=2}resource"streamtime_flink""etl"{identifier="etl"flink_provider="cmf"mode="application"fleet="<fleet>"flink_units=2project_version={project=streamtime_flink_project.etl.identifierversion="<version>"}}
Terraform does not manage the project’s CI upload key: create it when you set up CI, on the project page or with streamtime flink-project rotate-key. To manage an existing deployment or project, import it by identifier: terraform import streamtime_flink.analytics analytics. See streamtime_flink and streamtime_flink_project.
Check status
status is one of Pending, Provisioning, Updating, Healthy, Error or Deleting.
In the sidebar, select Flink. Each entry shows its status.
Open it. Overview shows its status, settings and endpoints.
curl -s"$API/flink/analytics/"-H"Authorization: Bearer $STREAMTIME_TOKEN"# Collect a fresh status report (waits for the answer)
curl -s-X POST "$API/flink/analytics/status/"-H"Authorization: Bearer $STREAMTIME_TOKEN"
resp,err:=call("GET","/flink/analytics/",nil)// Decode "status" from resp.Body.
streamtime flink list
streamtime flink get analytics
Not available in MCP yet. Check the status from the UI, API or CLI.
Submit and manage jobs (session mode)
A session cluster runs the jobs you submit to it. Each job claims Flink Units from the cluster’s Max Flink Units. Submitting a job starts it straight away.
Open the session deployment from Flink and select Submit Job (Submit First Job when it has none yet).
Enter the Job Identifier and its Flink Units, then the JAR or project version, parallelism and upgrade mode, and select Submit Flink Job.
Open a job to see its status, change it or delete it.
Use --project-version PROJECT@VERSION instead of --application-jar to run a registered project version. Setting a job’s Flink Units, or changing a job, isn’t available in the CLI yet; jobs it creates get 1 Flink Unit.
Not available in MCP yet. Submit and manage jobs from the UI or API.
Change the configuration or upgrade
Change the Flink Units, or upgrade to a new Version (advanced_configuration.chart_config.main.version). With the savepoint upgrade mode, Streamtime takes a savepoint first and resumes the job from it.
Open it from Flink and select Configuration (or Edit).
Change the settings, then save. Streamtime applies the change, and the status shows Updating, then Healthy.
# 1. Save the change. The response includes the new "generation".GEN=$(curl -s-X PATCH "$API/flink/analytics/"\-H"Authorization: Bearer $STREAMTIME_TOKEN"\-H"Content-Type: application/json"\-d'{"max_flink_units": 12}' | jq .generation)# 2. Apply it
curl -X POST "$API/flink/analytics/reconcile/"\-H"Authorization: Bearer $STREAMTIME_TOKEN"\-H"Content-Type: application/json"\-H"Idempotency-Key: $(uuidgen)"\-d"{\"generation\": $GEN}"
The SDK has no typed call for this update yet, so save it with the SDK’s HTTP client, then apply it:
Not available in the CLI yet. Change the configuration from the UI or API.
Not available in MCP yet. Change the configuration from the UI or API.
Change the attributes in the streamtime_flink block, for example max_flink_units, project_version or the settings in advanced_configuration, and run terraform apply. The plan shows an in-place update; Terraform saves the change, applies it and waits until the deployment runs it. Changing identifier, mode, flink_provider or fleet replaces the deployment.
View metrics, logs and alerts
Open it from Flink and select Monitoring for its metrics and logs, and Alert Rules (where shown) for the alerts that watch it. Alerts that fire also appear on the fleet’s Monitoring tab.
Metrics and logs are read through the fleet that runs it:
Not available in MCP yet. Delete it from the UI, API or CLI.
Remove the streamtime_flink block and run terraform apply, or run terraform destroy -target=streamtime_flink.analytics. Terraform waits until Streamtime has removed the deployment.