Skip to main content
ⓘINFO
This page covers the Confluent Cloud path. On AWS EKS + Confluent Platform (CFK), connection is mostly automatic and there is no Kafka API key — use Connecting a CFK cluster instead.After the wizard and the platform deploy (Helm on EKS, docker compose up -d on a VM). This page completes the Kafka cluster connection that started in the wizard’s cluster step — Step 7 — Cluster connection on the EKS path, Step 4 — Connect existing clusters on the VM path, where the clusters already exist and you give each one’s file:// reference (see file:// and env://). The wizard can declare the Kafka cluster, and GitHub Actions can provision it, but the Kafka API credential is attached only after the Kafka cluster exists and the Sariva platform is running.

Terms used on this page

Use these terms consistently when reading the remaining pages:
⚠WARNING
Sariva never stores your Kafka credentials. The secret value stays in your credential store. Sariva stores only a credential reference URI and fetches the secret value at runtime when it needs to talk to the Kafka cluster.

Per-cluster credentials: admin key vs observability key

For Confluent Cloud clusters, keep these two credentials separate. They have different privilege levels and different consumers. The Sariva pod does not create Confluent Cloud or AWS resources directly. Resource creation happens through GitOps: Sariva emits Terraform, opens a pull request, and GitHub Actions applies it with the customer-owned CI identity. The pod reads only the final observability credential reference at runtime.
⚠WARNING
Do not grant the Sariva pod access to the admin Kafka key. The admin key is for GitHub Actions / Terraform. The pod needs read access only to the observability credential used for monitoring.

Preconditions for laptop-based REST commands

The commands below run from your laptop against the Sariva platform REST API.
On the Linux VM (Docker) path there is no port-forward — the API is already at http://localhost:8000 and the bearer is the value you set in .env:
On the Kubernetes paths, if the platform is not exposed through an ingress URL, port-forward the Kubernetes Service from another terminal:
ⓘINFO
The CLI reads the bearer automatically from $SARIVA_PLATFORM_API_KEY. Use --api-key <bearer> only if you do not export the environment variable.

Credential reference formats

<CRED_REF> is one of these forms:
⚠WARNING
For AWS Secrets Manager or AWS SSM credential references, Sariva fetches Kafka cluster credentials at runtime using the Sariva platform pod’s AWS identity. Wire the pod AWS identity and grant the matching read permission before you register or patch the Kafka cluster with an AWS credential reference. See Wire the pod’s AWS identity.
⚠WARNING
The old k8s_secret://<name> shorthand is rejected by registration. Use explicit k8s://<namespace>/<name>. Vault, GCP Secret Manager, and Azure Key Vault are deferred.

Before you attach a credential, create or obtain it

The commands on this page attach a credential reference to a Kafka cluster. They do not create Confluent Cloud Kafka API keys by themselves. Create or obtain the required credential first, store it in your chosen credential store, then attach the reference. For Confluent Cloud, there are two credential tasks:
  1. Admin Kafka key, current manual path. After the Kafka cluster exists, create a cluster-level admin service account/key for Terraform and store that key in the CI-accessible credential store, such as AWS Secrets Manager or SSM. GitHub Actions reads this key during the cluster-layer apply.
  2. Observability Kafka key, GitOps path. Ask Sariva through Slack to create an observability credential for the Kafka cluster and store it in your selected credential store. Sariva opens a PR; GitHub Actions applies Terraform to create the read-only service account/key, writes the secret, and emits the credential reference for Sariva runtime monitoring.
⚠WARNING
If the Kafka credential store is AWS Secrets Manager or AWS SSM, two separate AWS permissions are involved: GitHub Actions needs access to read the admin credential and write the observability credential; the Sariva platform pod needs pod AWS identity read access to fetch the observability credential at runtime. Wire both before you rely on that credential reference.

How Kafka cluster registration can happen

Sariva supports watcher-driven registration and explicit REST registration. Pick the case that matches how your Kafka cluster was created.
!DANGER
Do not use sariva cluster register --from-tf-outputs from a customer laptop for this REST path. That mode is for local platform.db access in controlled runtime contexts, not a REST bulk import from the laptop. For customer laptops, use the watcher or the explicit REST commands above.

Registering clusters from your own pipeline

If you answered N to the wizard’s CI/CD applier question (Jenkins / ArgoCD / kubectl-only), there is no workflow watcher — your pipeline applies the Terraform and registers the resulting Kafka clusters itself. Three paths, shortest first: Path 1 — bulk, from terraform output -json (in-pod). --from-tf-outputs writes the platform’s registry database directly, so it runs inside the platform pod (see the warning above — not from a laptop):
The parser reads the env-layer shape — one entry per Kafka cluster under a top-level kafka_clusters output. If your pipeline doesn’t keep the emitted outputs.tf, synthesize the minimal equivalent:
id, env_id, and bootstrap_endpoint are required per cluster; rest_endpoint and environment_label are optional. Re-running on the same file is a no-op (already-known). Path 2 — per cluster, with explicit flags (from anywhere). The REST-client commands from the table above — sariva cluster register --api-url … --alias … --bootstrap-servers … --credentials-ref <CRED_REF> — work from any machine that can reach the platform API. Omit --credentials-ref only with --auth-type iam (MSK pod identity). Path 3 — raw REST (pipelines that can’t run the sariva CLI). POST /api/v1/clusters/register with the admin bearer:
Required: alias (your own spelling of the cluster’s name — letters, digits, ., _ and -, starting with a letter or digit, 1–64 characters; cluster_nc01 is fine), display_name, flavor, environment_label (any one word of yours — dev, nonprod, production, dr, dmz, …), bootstrap_servers, auth_type; sdlc_tier (non_prod|prod) when the label is not a known word (dmz, live) — a known word sets it (production, prod, dr → prod; dev, qa, uat, staging, test, nonprod, sandbox → non_prod); credentials_ref for every auth_type except iam. Unknown fields are rejected. Responses: 201 registered; 409 already registered (use sariva cluster patch / PATCH /api/v1/clusters/{alias}); 400 credential-gate failure; 422 unreachable.

Common path after GitHub Actions first apply

If the watcher registered the Kafka cluster, sariva cluster list should show something like this:
This means the Kafka cluster metadata is registered, but Sariva does not yet have a runtime observability credential. For Confluent Cloud, start with Confluent Cloud: per-cluster access to understand the admin key and observability key sequence. Then store the observability credential in your chosen credential store, grant Sariva read access, and attach the reference:
After the patch succeeds, the credential lifecycle should move from awaiting_credentials to resolved.

Universal credential ordering

⚠WARNING
Do these in this exact order or the credential gate fails:
  1. Create the Kafka credential in your chosen store.
  2. Grant Sariva read access to that credential. For Kubernetes, bind secrets:get to the Sariva platform ServiceAccount. For AWS, attach the required IAM statement to the pod AWS identity role. For file:// on the VM path, put the file in ./secrets/ (chmod 600) — the compose mount makes it readable in-container at /app/secrets/.
  3. Register or patch the Kafka cluster with the credential reference from your laptop.
  4. Sariva resolves the reference under the platform’s own identity, inside the container/pod, and validates the payload shape. If the Secret, keys, path, or RBAC/IAM access are wrong, the command returns an actionable error.

Payload shape per auth_type

The Secret, parameter, file, or variable must carry these keys:
ⓘINFO
For Confluent Cloud use auth_type: api_key and store api_key / api_secret. sasl_ssl_plain also works if you remap via keys: { username: api_key, password: api_secret } — same credential, different declared shape.
ⓘINFO
After the gate resolves, the admin-client probe may report reachable:false for Confluent Cloud. Consumer-lag uses the Confluent Cloud Metrics API, keyed on monitoring_ok, not on reachable. Do not read reachable:false alone as broken.

How to connect each Kafka cluster

Pick the page that matches where that Kafka cluster’s credentials live, or its provider/flavor:

Kubernetes Secret

Verified path; also the only mTLS option.

AWS Secrets Manager

JSON secret + pod AWS identity read policy.

AWS SSM

SecureString parameter + KMS decrypt.

file:// and env://

VM-native: a JSON file on the host, or a named env var.

Self-hosted

SASL/SCRAM, PLAIN, mTLS — customer-managed.

MSK

IAM auth via the pod AWS identity — no stored credential.

Migration & rotation

Rotate keys; migrate from an older flow.

Continue the deployment path

Next: per-cluster credentials

Create the admin Kafka key and attach the observability credential for each Confluent Cloud cluster.

Back to the AWS EKS path

Return to the EKS path map to confirm where this step fits.

Back to the VM path

Running on a Linux VM? Return to the VM checklist.