Skip to main content
StreamNative Private Cloud supports the Kafka protocol via the Ursa engine, a Kafka-compatible data streaming engine that has been refined through our extensive experience developing Pulsar, KoP (Kafka-on-Pulsar), and managing both Pulsar and Kafka at scale. Designed for today’s cost-conscious economy, Ursa offers a genuinely cloud-native experience and enterprise-grade features that boost developer productivity and operational efficiency.
  • All of the Kafka features you’re used to: Ursa supports all the Kafka features you’re accustomed to, including KStreams, KSQL, KTables with Topic Compaction, Schema Registry for the Java Client, and Kerberos Authentication for Kafka Clients.
  • Great developer experience: Ursa features streamlined local testing, with its own testcontainers module.
  • Robust and reliable: Architecturally designed for scale and subjected to rigorous resilience testing. We’ve fortified Ursa through comprehensive testing, ensuring it meets and exceeds the demands of large-scale Kafka operations.

Prerequisites

To use the Kafka Protocol on StreamNative Private Cloud, ensure you are using image streamnative/private-cloud:3.1.0.4 or later.
To expose Kafka service outside the Kubernetes cluster, deploy your Pulsar cluster with Istio. See Deploy Pulsar with Istio for detailed instructions.

Enable Kafka Protocol

To enable the Kafka protocol, update the PulsarBroker CR with the following configuration:
Configuration Fields:
  • spec.config.protocolHandlers.kop.enabled: Required. Set to true to enable the Kafka protocol.
  • spec.config.transactionEnabled: Required. Set to true to enable Kafka transaction support.
The operator will automatically restart the broker pods to apply the changes.

Verify Kafka Protocol

After enabling the Kafka protocol, verify that it’s working correctly.

Get Service Endpoints

Retrieve the Kafka endpoints from the PulsarBroker status:
Internal Endpoint (within Kubernetes cluster):
  • Kafka: private-cloud-broker.pulsar.svc.cluster.local:9092
External Endpoint (outside Kubernetes cluster, if using Istio):
  • Kafka TLS: pulsar.example.com:9093

Test Kafka Connectivity

Test Within Kubernetes Cluster

Use a Kafka client pod within the cluster to test connectivity:

Test Outside Kubernetes Cluster

If you deployed with Istio and configured external access, test from outside the cluster using TLS:
  1. Create a client-ssl.properties file:
  1. Use Kafka console tools with TLS:

Advanced Configuration

Kafka-Specific Broker Settings

You can customize Kafka-specific settings through the PulsarBroker configuration:

Topic Management

Kafka topics are automatically created as Pulsar topics. The default topic format is:
You can manage topics using either Kafka or Pulsar tools:

Consumer Groups

Kafka consumer groups are mapped to Pulsar subscriptions. Each consumer group creates a corresponding subscription in Pulsar.

Use Kafka with Authentication

If your Pulsar cluster has authentication enabled, you need to configure Kafka clients accordingly.

With JWT Authentication

Configure Kafka clients to use SASL/PLAIN with JWT tokens:

With OAuth2 Authentication

Configure Kafka clients to use SASL/OAUTHBEARER:

Troubleshooting

Kafka Protocol Not Available

  1. Verify the Kafka protocol is enabled in the broker configuration:
  1. Check broker logs for Kafka-related errors:
  1. Ensure the broker pods have restarted after configuration changes:

Connection Refused or Timeout

  1. Verify network connectivity to the broker:
  1. If using Istio, check the Gateway and VirtualService:
  1. Verify the Istio Ingress Gateway is routing traffic correctly:

Authentication Failures

  1. Verify authentication is configured correctly in the broker:
  1. Check that the JWT token or OAuth credentials are valid
  2. Review broker logs for authentication errors:

Transaction Failures

  1. Verify transactions are enabled:
  1. Check transaction coordinator logs:

Performance Tuning

Broker Configuration

For high-throughput Kafka workloads, consider tuning these broker settings:

Client Configuration

Optimize Kafka client configuration for better performance: