USM Demo: Self-Managed Kafka in the Cloud UI
Confluent Platform 8.3 on EKS with CFK 3.3, registered in Confluent Cloud Unified Stream Manager over PrivateLink, with a source-initiated link of users and pageviews, Schema Linking, Control Center, and a laptop proxy into the private Cloud Console.
Overview
You open Confluent Cloud and the clusters on the screen are the ones Cloud is running. The brokers in your VPC sit behind another login.
Think of a locked basement and a monitor at the front desk. The basement calls the desk on a private line, paints its own cameras onto that monitor, and sends copies of two shelves upstairs. You also get a service window into the basement, and a slot in the lobby glass that looks back at those upstairs shelves.
That private line is PrivateLink. Confluent Platform 8.3 (KRaft) runs on EKS under Confluent for Kubernetes 3.3. A Unified Stream Manager agent dials out, and the CP cluster shows up in the same environment as a private Enterprise cluster: brokers, topics, Connect, consumer groups, and a Kafka Streams app. The two shelves are users (JSON) and pageviews (Avro), mirrored by a source-initiated cluster link, with Schema Linking keeping pageviews-value on the same schema ID. The service window is Control Center next-gen 2.6 at http://localhost:9021. The lobby slot is a TLS passthrough proxy so the Cloud Console in your browser can reach the private Enterprise endpoints.
Terraform, CFK custom resources, and a handful of shell scripts are the whole thing. They live in usmDemo.
How it works
make up is seven steps: infra, CP (including Control Center), USM registration, workloads, the hybrid Cloud path, then make c3 and make console. Three pipes share one PrivateLink. Two local paths let the laptop see the private clusters.
- Telemetry. CFK turns on
dependencies.usmAgentClient.clientMetricsEnabledfor Kafka and KRaft, which configures the telemetry exporter and the KIP-714 / KIP-1076 client-metrics subscription (includingorg.apache.kafka.stream.*). The USM Agent (cp-usm-agent:1.2.1) posts that to Cloud.make registerthen registers the CP Kafka cluster and the Connect cluster through the/usm/v1REST API.dependencies.metricsClientadds a second exporter,_c3, aimed at Control Center’s Prometheus on port 9090. - Data. A destination
ClusterLinkis applied first and declares mirror topicsusersandpageviews. A sourceClusterLinkon the CP brokers dials the Enterprise cluster. A fully managed Datagen connector on Cloud writesorders.ccloud-demo-consumeron EKS readsusersandordersback through the same access point.ccloud-avro-consumerreads thepageviewsmirror. - Schemas. Datagen writes Avro pageviews to
pageviewsagainst the CP Schema Registry. ASchemaExportercopies subjectpageviews-valueinto Cloud Schema Registry withcontextType: NONE, in IMPORT mode, so the schema ID in the mirrored bytes still resolves. - Local UIs.
make c3port-forwards Control Center tolocalhost:9021.make consoleis the browser path into the private cluster:/etc/hostssends thelkc-andlsrc-names to127.0.0.1, pf redirects 443 to 18443, kubectl port-forwards into theconsole-proxypod, and NGINXssl_prereadforwards the TLS stream by SNI. TLS ends in the browser.
EKS namespace usm
KRaft x3 · Kafka x3 · Connect x2 · Schema Registry · Control Center 2.6
datagen-users → users · datagen-pageviews → pageviews · s3-sink → S3
ks-validate (WordCount) · persistent-consumer
│
├─ USM Agent ──────── PrivateLink ─► USM view
├─ cluster link (source) ──────────► Enterprise: users, pageviews mirrors
├─ schema exporter (NONE) ─────────► Cloud SR: pageviews-value, same ID
└─ metricsClient (_c3) ────────────► Control Center Prometheus :9090
laptop
├─ make c3 ── port-forward ────────► http://localhost:9021
└─ make console
/etc/hosts + pf :443 → :18443 → port-forward → console-proxy
NGINX ssl_preread ── PrivateLink ─► Enterprise REST / Cloud SR
same PrivateLink, reads from EKS:
managed Datagen → orders
ccloud-demo-consumer reads users + orders
ccloud-avro-consumer reads pageviews via Cloud SR
Workloads on the CP side are small on purpose. JSON users, Avro pageviews, an S3 sink that uses EKS Pod Identity for its AWS credentials, a SASL consumer on users, and a stateful Kafka Streams WordCount so the Streams page has RocksDB and processor metrics to show.
Optional make flink adds Confluent Manager for Apache Flink and a drop-gender SQL job from users to users-redacted. The core walkthrough stands without it.
What it demonstrates
The walkthrough is the Confluent Cloud UI for environment usm-demo, the Enterprise cluster beside it, and the two local UIs:
- The CP cluster sits next to cloud clusters, with broker, partition, and throughput metrics.
- Topics from
usersthroughstreams-wordcount-outputshow live throughput. - Connectors
datagen-users,datagen-pageviews, ands3-sink-usersrun on self-managed Connect and still show task status. The S3 bucket is a Terraform output. - Consumer groups include
users-persistent-consumer,connect-s3-sink-users, andks-validate, with lag. - Kafka Streams for
ks-validate: thread and state, RocksDB, end-to-end latency, processor metrics. - Hybrid data. On cluster
usm-demo-cloud,usersandpageviewsare mirror topics from thecp-to-cloudlink.ordersis produced in Cloud.ccloud-demo-consumeron EKS readsusersandorders. - Schema Linking.
pageviews-valueappears in the environment Schema Registry in IMPORT mode with the same schema ID as CP.ccloud-avro-consumerdecodes the mirrored Avro through the Cloud SR. - Control Center on
http://localhost:9021is the CP-side UI. Kafka and KRaft push broker metrics to its Prometheus through the_c3exporter. With no license it runs as a 30-day trial. - Cloud Console on the private cluster. After
make console, mirror topics show the link icon and the message browser loads, because those pages call the private REST endpoint from your browser.
Technical details
- AWS: Terraform builds a 3-AZ VPC with a single NAT, EKS 1.35, a managed node group (default 4×
m5.xlarge), the EBS CSI driver, Pod Identity, and an S3 bucket plus IAM role for the sink. Default region isus-east-1. Prefix isusm-demo. - PrivateLink: a Confluent Cloud ingress PrivateLink gateway, an AWS interface VPC endpoint, an access point, and a Route53 private zone for
*.<access-point-domain>. The agent front door ishttps://api-<ap-id>.<region>.aws.accesspoint.glb.confluent.cloud. The Enterprise bootstrap hostname islkc-<id>-<ap-id>.<region>.aws.accesspoint.glb.confluent.cloud. - Confluent Cloud: an environment with Advanced Stream Governance, a USM service account (
UsmAgentandDataSteward) plus a Cloud resource-management API key, and a private Enterprise cluster with acloud-appservice account. That account isCloudClusterAdminhere to keep the demo short. - CFK: namespace
confluentfor the operator, namespaceusmfor KRaftController ×3, Kafka ×3 (cp-server:8.3.0), Connect ×2, Schema Registry, the USMAgent, topics, and Control Center (cp-enterprise-control-center-next-gen:2.6.1) with its Prometheus and Alertmanager. Connectors, apps, and the console proxy live underk8s/connectors,k8s/apps, andk8s/ccloud. - Console proxy:
k8s/ccloud/60-console-proxy.yamlis an NGINX pod with no Service. It forwards only to*.aws.accesspoint.glb.confluent.cloud, resolved through VPC DNS and the Route53 private zone.make cclouddeploys it.scripts/console-proxy-local.shadds the hosts entries and the pf rule, and sudo runs only when the private endpoint is still unreachable.make consoleis idempotent.make console-stopandmake downremove the forward, the hosts lines, and the pf rule. - Registration:
confluent usm kafka|connect registerwants an interactive login.scripts/register-usm.shcalls the same API with the Cloud API key. - Secrets stay out of git.
.env, tfvars, state, and the generated kubeconfig are ignored. SASL passwords come from Terraformrandom_passwordand are pushed into Kubernetes byscripts/deploy-cp.sh. Local Terraform state holds API keys. A remote encrypted backend is the step past a personal demo.
Challenges & lessons
- PrivateLink is the only front door. The USM Agent reaches Confluent Cloud on a private connection. If the agent is dark, resolve the front-door host from a pod in the cluster. Route53 should answer with VPC-endpoint addresses.
- Register Connect before you create connectors. USM learns a connector from the metadata event emitted when the connector is created. A connector that already exists is rejected with
USM resource not found (Connector).make workloadsruns aftermake register. On a live cluster, delete theConnectorCRs and apply them again. - The Cloud credential secret has its own name. CFK writes
<agent-name>-ccloud-credentialfor the agent Envoy config and will overwrite a secret you placed at that name. The CR then fails becausebasic.txtis missing. This repo usesccloud-usm-agent-credential. - The Streams page needs CP 8.3, DEBUG metrics, and a stateful topology. 8.2.x skips the string gauges
stream.state,thread.state, andapplication.id.ks-validatesetsmetrics.recording.level=DEBUGand usescount()so RocksDB shows up. It runs on acp-kafkaimage because RocksDB needslibstdc++. Connect 8.1.2 through 8.3.0 also needs theconfluent.telemetry.exporter._usm.metrics.includeoverride ink8s/cfk/30-connect.yaml. - Schema Linking keeps the ID in the default context. Mirrored
pageviewsrecords carry the CP schema ID in the header bytes.contextType: NONEexportspageviews-valueas-is into the Cloud SR default context and sets IMPORT mode, so that ID still resolves.AUTOwould place the subject under a.lsrc-...context. The CP Schema Registry needsenableSchemaExporter: trueand apasswordEncoderfor the stored destination credentials. - The link is source-initiated, and its truststore is tiny. Cloud has no route to the brokers on EKS, so the CP brokers dial out. Create the destination
ClusterLinkfirst (it declares the mirrors), then the source CR. The KafkapasswordEncoderencrypts the Cloud credentials stored on that link. The TLS truststore lives in the link config, capped at 32 KB, so the script ships only the ISRG roots. Terraform runs outside the VPC, which is why the Enterprise cluster setsdisable_wait_for_ready = true. CFK applies the cloud topics and the link from inside the cluster. - The Cloud Console calls the private REST endpoint from the browser. Mirror state, messages, and schemas load from that hostname.
make consolemaps thelkc-andlsrc-names to127.0.0.1, redirects 443 to 18443 with pf, and port-forwards toconsole-proxy. macOS blocks a normal user from binding 443, and kubectl has to stay in your SSO session, so sudo covers only the hosts file and the pf rule. Re-runmake consoleafter a reboot, because pf rules are gone, or after an AWS SSO refresh. If the endpoint is unreachable, read.console-proxy.log. - Control Center rides a second exporter. Next-gen C3 ships its own Prometheus and Alertmanager.
dependencies.metricsClienton Kafka and KRaft makes CFK add_c3beside the USM exporter. Adding it to a running cluster rolls the controllers and brokers. With no license, C3 is a 30-day trial. - An authorizer changes the KRaft restart story. This demo leaves authorization off. If you turn on the
simpleauthorizer withallow.everyone.if.no.acl.found=true, addUser:ANONYMOUStosuperUserson Kafka and on KRaft. Controllers need that to re-form quorum after a cold restart.