Kafka clusters
Skill streamnative/streamnative-agent-skills/skills/kafka-clusters
Create and manage StreamNative Kafka instances and Kafka clusters across dedicated, dedicated-pro, BYOC, and BYOC Pro deployments. Use when the user asks to create/list/describe/delete a Kafka Instance or KafkaCluster, configure throughput units, cluster profiles, gateways, schema registry, mTLS, Kafka RBAC, or switch snctl service context to a KafkaCluster. For BYOC substrate (cloud connections, environments, volumes, pools) open byoc-infrastructure first.From its SKILL.md
npx -y skills add streamnative/streamnative-agent-skills --skill kafka-clustersAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
14.4 KB, as published. Nobody here has run it
kafka-clusters
When to use this skill
- User asks to create, list, describe, or delete Kafka
InstanceorKafkaClusterresources. - User mentions
kafkacluster, Kafka RTU / throughput unit,clusterProfile, Kafka gateways, Kafka mTLS, Kafka RBAC, or Kafka cluster Schema Registry endpoint. - User wants
snctl context use/ service-context setup for KafkaCluster data-plane commands. - User wants dedicated, dedicated-pro, BYOC, or BYOC Pro Kafka deployments. KafkaCluster does not support serverless today.
Execution base
Prefer StreamNative Cloud remote MCP when available: use sncloud_clusters_read / sncloud_clusters_write for Instance, KafkaCluster, and controller-managed cluster resources visible in catalog; use sncloud_resource_catalog / sncloud_resource_schema before writes. Remote MCP is public preview and disabled by default; newly created clusters have cluster-level MCP disabled until user enables it in StreamNative Cloud UI, so data-plane follow-up through sncloud_context_use_cluster may not work immediately after create; when it does succeed, output MCP_TOOLS_REFRESH_REQUIRED instance=<instanceName> cluster=<clusterName> and stop so the runner/runtime can refresh tools before data-plane calls. See ../cloud-core/references/remote-mcp.md. Use snctl fallback when MCP tools are unavailable or for CLI-specific examples below.
Prerequisites check
Remote MCP route: start with sncloud_context_whoami, then catalog/schema for clusters domain. snctl route: run standard checks (snctl version --client, snctl auth whoami, snctl config get). Require snctl >= v1.7.0 for KafkaCluster-related workflows; upgrade before create/list/describe/delete/context actions. Defer auth/install failures to cloud-core.
KafkaCluster-specific control-plane prerequisites:
- Organization must have Instance enabled (
cloud.streamnative.io/instance-enabled=true). - Organization must have AuthV2 enabled (
CloudFeature AuthV2=true). snctl create kafkaclusterfails early if either feature is missing.- For BYOC, cloud connection + cloud environment + pool/member must already exist; switch to
byoc-infrastructureif missing.
Mental model
Two layered kinds:
- Instance — top-level container; picks deployment type and infrastructure pool. New shared kind used by Kafka and new AuthV2 service contexts. Do not use
PulsarInstancefor KafkaCluster. - KafkaCluster — Kafka runtime bound to an
Instance. Controller provisions Kafka brokers plus optional Kafka REST Proxy and Schema Registry endpoint.
KafkaCluster important fields:
spec.instanceName— required parentInstance.spec.location— required location/region.spec.poolMemberRef— required by admission on create;snctl createmay resolve and populate it from--location, but raw manifests must set bothnamespaceandname.spec.throughputUnit— requested Kafka broker capacity in RTU; defaults to1.spec.clusterProfile—latency-optimized(default in cloud-manager UI) orcost-optimized.spec.endpointAccess[].gateway— gateway names used to expose Kafka endpoints.spec.config.custom— Kafka broker config key/value overrides.spec.mtls.enabled— enable client-to-broker mTLS.spec.rbac.enabled— admission defaults this totrueon create when omitted; set false via--disable-rbac/ manifest when Kafka RBAC should be off.metadata.annotations.cloud.streamnative.io/enable-schema-registry: "true"— requests controller-managedSnSchemaRegistry+ backend config.metadata.annotations.cloud.streamnative.io/schemaregistry— controller writes associated Schema Registry name, normally same as KafkaCluster.metadata.annotations.cloud.streamnative.io/auth: "v2"— controller-managed resources use AuthV2; service context expects AuthV2 token flow.
Deployment-type decision tree
Ask deployment type before create action. If unclear:
- StreamNative managed cloud or customer cloud account?
- StreamNative managed cloud: dedicated or dedicated-pro? KafkaCluster does not support serverless today.
- Customer cloud: BYOC or BYOC Pro, and is cloud connection/environment/pool Ready?
Supported Instance.spec.type for KafkaCluster: dedicated | dedicated-pro | byoc | byoc-pro.
Primary workflows
For remote MCP writes, compose JSON-string manifests and call sncloud_clusters_write with operation=apply, dry_run=true; only repeat with dry_run=false after validation. Use sncloud_clusters_read for list/get. Never use generic sncloud_resources_*.
W1. Create dedicated Instance + KafkaCluster
snctl create instance my-instance -n my-org \
--pool streamnative/shared-aws \
--type dedicated
snctl create kafkacluster my-kafka -n my-org \
--instance-name my-instance \
--location us-east-1 \
--throughput-unit 2 \
--cluster-profile latency-optimized
# snctl resolves --location to exact PoolMember and sends spec.poolMemberRef.
# Enable Schema Registry when using manifests. `snctl create kafkacluster` does not expose
# a schema-registry flag in every version; prefer manifest when endpoint is required.
Manifest path:
snctl apply -f ${CLAUDE_PLUGIN_ROOT}/skills/kafka-clusters/assets/manifests/instance-dedicated.yaml
snctl apply -f ${CLAUDE_PLUGIN_ROOT}/skills/kafka-clusters/assets/manifests/kafkacluster-dedicated.yaml
W2. Create BYOC / BYOC Pro Instance + KafkaCluster
Prerequisite: run BYOC substrate workflows from byoc-infrastructure first.
snctl get cloudconnection -n my-org -o name
snctl get cloudenvironment -n my-org -o name
snctl get poolmember -n my-org
snctl create instance my-instance -n my-org \
--pool my-org/my-pool \
--type byoc
snctl create kafkacluster my-kafka -n my-org \
--instance-name my-instance \
--pool-member-name my-org/my-pool-member \
--throughput-unit 2 \
--cluster-profile latency-optimized
Use --type byoc-pro for BYOC Pro pools.
W3. Create with Schema Registry / REST Proxy endpoints
cloud-manager creates KafkaCluster with cloud.streamnative.io/enable-schema-registry: "true" so controller provisions same-named SnSchemaRegistry and records cloud.streamnative.io/schemaregistry on KafkaCluster.
snctl apply -f ${CLAUDE_PLUGIN_ROOT}/skills/kafka-clusters/assets/manifests/kafkacluster-dedicated.yaml
snctl get snschemaregistry -n my-org
snctl get snschemaregistry my-kafka-dedicated -n my-org -o yaml
Endpoint sources:
- Kafka bootstrap:
KafkaCluster.status.serviceEndpoints, prefertype: external. - Kafka REST Proxy:
KafkaCluster.status.kafkaRestProxy.serviceEndpoint. - Schema Registry: associated
SnSchemaRegistry.status.serviceEndpoints, prefertype: external.
Direct KafkaCluster does not imply Kafka Connect endpoint; Kafka Connect remains PulsarCluster/KSN path unless backend adds separate support.
W4. List / describe / delete
snctl get instance -n my-org
snctl get kafkacluster -n my-org
snctl get kafkacluster my-kafka -n my-org -o yaml
snctl describe kafkacluster my-kafka -n my-org
# Delete child before parent. Use --wait=false for async cloud teardown.
snctl delete kafkacluster my-kafka -n my-org --wait=false
snctl delete instance my-instance -n my-org --wait=false
snctl get kafkacluster my-kafka -n my-org --ignore-not-found
W5. Update scale/profile/config
Preferred: edit manifest and snctl apply -f from source control.
Interactive edit:
snctl edit kafkacluster my-kafka
For config, prefer manifest because manual nested-map edits are easy to get wrong.
W6. Inspect readiness and endpoints
snctl get kafkacluster my-kafka -n my-org -o jsonpath='{.status.conditions[?(@.type=="Ready")].status}'
snctl describe kafkacluster my-kafka -n my-org
snctl get kafkacluster my-kafka -n my-org -o jsonpath='{.status.serviceEndpoints}'
snctl get kafkacluster my-kafka -n my-org -o jsonpath='{.status.kafkaRestProxy.serviceEndpoint}'
Status endpoints:
status.serviceEndpoints[type=external].dnsName— preferred Kafka bootstrap endpoint.status.serviceEndpoints[type=internal].dnsName— fallback/internal bootstrap endpoint.status.kafkaRestProxy.serviceEndpoint— Kafka REST Proxy URL host.- Associated
SnSchemaRegistryis usually named same as KafkaCluster. Trust annotationcloud.streamnative.io/schemaregistryfirst; fallback to same-nameSnSchemaRegistry.
W7. Use KafkaCluster as service context
Remote MCP route: use fixed Kafka cluster endpoint, or organization-level sncloud_context_available_clusters → sncloud_context_use_cluster; after a successful org-level cluster switch, output MCP_TOOLS_REFRESH_REQUIRED instance=<instanceName> cluster=<clusterName> and stop so the runner/runtime refreshes MCP tools; after resume, use feature-gated Kafka tools such as kafka_admin_topics_read/write, kafka_admin_groups_read/write, kafka_admin_sr_read/write, kafka_admin_connect_read/write, kafka_client_produce, and kafka_client_consume. Both require cluster-level MCP enabled for the target cluster in StreamNative Cloud UI; newly created clusters default to disabled.
snctl route: KafkaCluster context uses Instance/AuthV2 flow. It exchanges current user or selected service account grant, then writes Kafka client config.
snctl context use -n my-org --instance my-instance --kafka-cluster my-kafka
snctl kafka admin topics list
snctl kafka admin groups list
Important auth behavior:
- Broker SASL user is extracted from AuthV2 access token username.
- Broker password is raw access token (not
token:<jwt>) for KafkaCluster contexts. - Schema Registry and REST Proxy use same AuthV2 token.
snctl kafka connect ...can be unavailable for direct KafkaCluster context when no Kafka Connect URL exists; use PulsarCluster/KSN context for Connect.- If prompted, select service account with required RBAC. For automation, activate SA key first or pass service-context SA options supported by your snctl version.
Common flags and output conventions
Standard rules from cloud-core apply. KafkaCluster-specific:
metadata.name/ CLI cluster name forKafkaClustermust be 20 characters or fewer. Longer names fail server-side withname is longer than 20 characters.--instance-namerequired.--locationor--pool-member-namerequired forsnctl create; direct manifests must includespec.poolMemberRef.nameandspec.poolMemberRef.namespace.--throughput-unitmust be>= 1; default1.--cluster-profile cost-optimized|latency-optimized.--gateways <name>repeatable.--config key=valuerepeatable; becomesspec.config.custom.--catalog <name>associates one catalog for compaction/lakehouse workflows.--mtls-enabledsetsspec.mtls.enabled=true.--disable-rbacsetsspec.rbac.enabled=false; leaving it unset enables RBAC because admission defaults it to true on create.- Schema Registry enablement is annotation-driven (
cloud.streamnative.io/enable-schema-registry: "true"); use manifest if currentsnctl create kafkacluster --helplacks a flag.
Reference index
- references/deployment-types.md — Instance deployment types and pool mapping.
- references/manifest-schemas.md — Instance/KafkaCluster/SnSchemaRegistry schemas and snippets.
- references/regions-clouds.md — region/location examples.
- references/authv2-service-context.md — KafkaCluster context auth and endpoint mapping.
Pitfalls and gotchas
- Remote MCP
sncloud_clusters_writemanifestis JSON string, not YAML/object. Omitstatusand read-only metadata copied from read output. - Creating a cluster does not enable cluster-level MCP. Ask user to enable cluster-level MCP in StreamNative Cloud UI before using
sncloud_context_use_clusteror Kafka data-plane MCP tools on that cluster. Aftersncloud_context_use_clustersucceeds, emitMCP_TOOLS_REFRESH_REQUIRED instance=<instanceName> cluster=<clusterName>and wait for runner/runtime refresh because selected cluster context changes the session-scoped tool surface.ToolSearchis not refresh. KafkaClusternames must be <=20 characters; use short smoke-test names.- KafkaCluster uses Instance, not
PulsarInstance. - KafkaCluster does not support serverless Instance today; use dedicated, dedicated-pro, BYOC, or BYOC Pro instead.
- KafkaCluster create requires both Instance and AuthV2 org features. Missing feature errors are expected guardrails, not CLI bugs.
--pool-member-namemust belong to the Instance pool; snctl rejects mismatched pool member vsInstance.spec.poolRef.--locationmust resolve to exactly one matching pool member. Ambiguous location requires explicit--pool-member-name.throughputUnitis RTU capacity, not broker replica count. Controller translates RTU to resources unless backend config overrides.clusterProfileonly acceptscost-optimizedorlatency-optimized.- KafkaCluster service context auth differs from legacy Pulsar+KoP context: broker password is raw AuthV2 access token, and username comes from token claims.
- Associated Schema Registry may not exist immediately; poll KafkaCluster Ready and list
snschemaregistryif endpoint missing. - Do not read Schema Registry from
KafkaCluster.status.serviceEndpoints; cloud-manager may expose confusing generated fields, but authoritative source isSnSchemaRegistry.status.serviceEndpoints. - Direct KafkaCluster contexts do not expose Kafka Connect; absence of
KafkaConnectUrlis expected. snctl deletedefaults to--wait=trueand can block during cloud teardown. Use--wait=false, then poll.