Streamtime runs Flink on a Kubernetes fleet and keeps it monitored and up to date. A Flink deployment runs in one of two modes:
Application (a single-job cluster): the cluster runs one job, from an application JAR or a registered Flink project version, and is sized in Flink Units.
Session: a shared cluster, sized up to Max Flink Units, that you submit jobs to. Each job claims Flink Units from it.
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) and a State Backend Tier (Stateless, Light, Heavy or Heavy-RocksDB).
Savepoints and upgrade modes (stateless, savepoint or last-state) for safe job upgrades.
Flink Web UI, optionally, and metrics, logs and alerts for every deployment.
Flink projects: CI registers each build from your own artifact store as a version, and deployments run it by version. See Flink projects.
Settings
Basic Configuration: Identifier, Description, Provider, the mode, and Flink Units (application) or Max Flink Units (session).
Fleet Selection: the fleet to run on, or let Streamtime choose one.
Advanced Configuration
For application mode: the application JAR location (or a project version), entry class or Python entry file, and arguments.
Parallelism and upgrade mode; savepoint strategy.
Optimization Goal and State Backend Tier.
Web UI Enabled, Flink configuration (flink_conf), and JobManager and TaskManager resources.
The chart Version, to upgrade.
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.
Basic Configuration: enter the Identifier, choose the Provider and the mode, and set Flink Units (application) or Max Flink Units (session).
Fleet Selection: choose the fleet.
Advanced Configuration: for application mode, the JAR or project version to run; then parallelism, upgrade mode, Optimization Goal, State Backend Tier and Web UI Enabled.
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. For application mode, send flink_units and either advanced_configuration.application_jar or project_version ({"project": "<project>", "version": "<version>"}). Add "fleet": "<fleet>" to choose the fleet.
The CLI saves the deployment but can’t start provisioning it yet. Start it from the UI, or with the API’s reconcile request.
Not available in MCP yet. Create the deployment from the UI, API or CLI.
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, the advanced settings (parallelism, upgrade mode, resources, Flink configuration), 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.
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: