Skip to main content
Istio is an open source service mesh that layers transparently onto existing distributed applications. It provides a uniform and more efficient way to secure, connect, and monitor services. This document describes how to configure Istio on StreamNative Platform to expose KoP, MoP, AoP, the Pulsar broker, StreamNative Console, and Grafana services.

Prerequisites

  • sn-platform chart: 1.6.2 or higher
  • pulsar-operator chart: 0.12.3 or higher
  • cert-manager operator: v1.0.0 or higher
  • Install kubectl v1.16 or higher.
  • Install Helm 3.0 or higher.
  • Install the istioctl CLI tool.

Limitations

In the sn-platform chart versions prior to 1.6.2, it is not supported to expose HTTP requests through Pulsar Proxy when Istio is enabled. Therefore, it is recommended to disable Pulsar Proxy when you want to enable Istio.

Install Istio

This section describes how to install Istio with the Istio operator. For other Istio installation methods, see installation guides.
  1. Go to the Istio release page to download the installation file for your Operating System (OS), or download and extract the latest release automatically (Linux or macOS):
The command above downloads the latest release (numerically) of Istio. You can pass variables on the command line to download a specific version or to override the processor architecture. For example, to download Istio 1.13.1 for the x86_64 architecture, execute the following command:
  1. Move to the Istio package directory. For example, if the package is istio-1.13.1:
  2. Install the Istio operator.

Install Istio Ingress Gateway

Istio Ingress Gateway describes a load balancer operating at the edge of the Pulsar that receives incoming HTTP/TCP connections. It configures exposed ports, protocols, etc.
  1. Define a YAML file of the Istio Ingress Gateway. This example defines an Istio Ingress Gateway YAML file (ingressgateway.yaml), which configures gateways on different ports for KoP, MoP, AoP, HTTPS, TLS, and HTTP services.
  2. Apply the YAML file to install the Istio Ingress Gateway.
  3. View whether configurations are applied successfully.
    Example output
    From the above output you can see that the Istio Ingress Gateway is installed successfully.
  • If the EXTERNAL-IP value is set, your environment has an external load balancer that you can use for the Istio Ingress Gateway. If the EXTERNAL-IP value is <none> (or perpetually <pending>), your environment does not provide an external load balancer for the Istio Ingress Gateway. In this case, you can access the Istio Ingress Gateway using the service’s node port.
  • If you have an external load balancer for your Kubernetes cluster, you need to specify the port 9093, port 8883, port 5671, and port 6651 for KoP, MoP, AoP, and the Pulsar Broker respectively on the load balancer.
  • If you do not have an external load balancer for your Kubernetes cluster, you need to specify the node port 9093 for KoP, the node port 8883 for MoP, the node port 5671 for AoP, and the node port 6651 for the Pulsar Broker. By default, Kubernetes does not permit port 9093, port 8883, or port 6651. Therefore, you need to add the --service-node-port-range=6000-40000 field at the /etc/kubernetes/manifests/kube-apiserver.yaml Kubernetes API server configuration file and then use the systemctl restart kubelet command to restart the Kubernetes API server to reload new configurations.

Enable Istio Gateway

This section describes how to enable the Istio Gateway.

Configure TLS Ingress Gateway

Certificates can be issued in multiple methods. This section describes two methods. You can choose either of them to issue certificates for the Istio Ingress Gateway.

openssl

This section describes how to manually configure the TLS Ingress Gateway to expose a secure service using TLS.
  1. Generate client and server certificates and keys. a. Create a root certificate and private key to sign the certificates for your services.
    b. Create a certificate and a private key.
  2. Create a secret for the Istio Ingress Gateway.

cert-manager

cert-manager supports issuing certificates through different issuers. You can use either an internal or a public issuer to issue the certificates.
To generate certificates with an internal issuer, you can set certs.istio_internal_issuer.enabled to true in the values.yaml YAML file and then use the helm upgrade command to update the resource. The certificates generated by the internal issuer are self-signed certificates.
  • [1] enabled: use an internal issuer.
  • [2] type: specify the type of the internal issuer.
    • selfsigning: the selfsigning issuer generates a Certificate Authority (CA) based on an automatically-generated secret. You can use the private key of the certificate to sign the certificate itself.
    • secret: the secret issuer represents a CA whose certificate and private key are stored inside the cluster as a Kubernetes Secret. Then, you can use the Kubernetes Secret to sign a certificate.
    • custom: you can specify an internal issuer through this option. For example, you can specify using Vault to sign certificates for your PKI, as shown below.
  • [3] issuers and its sub fields: the configuration of the internal issuer.
    • selfsigning: the selfsigning issuer has no dependency on any other resource. Therefore, you do not need to configure any item for this issuer.
    • secret: secretName is the name of the Secret resource that is automatically created and managed by the CA. It is populated with a private key and certificate, signed by the issuer.
    • custom: you can configure items for custom certificate issuers. For more detailed configurations, see the cert-manager documentation.

Enable Istio Gateway and expose services through the Pulsar broker

This example enables the Istio Gateway, specifies values for certSecretName (the name of the Kubernetes secret that was created in the previous step), and defines the URLs for the Pulsar broker and StreamNative Console.
  1. Configure the Istio Gateway for StreamNative Platform in the values.yaml YAML file as follows:
    • [1] namespace: the default namespace for the Istio gateway. By default, it is set to istio-system.
    • [2] mode: the TLS mode for the Istio gateway. Available options are SIMPLE and PASSTHROUGH. By default, it is set to SIMPLE.
      • SIMPLE: terminate TLS traffic at the Istio gateway. In this case, the gateway certificate is used.
      • PASSTHROUGH: do not terminate TLS traffic at the Istio gateway. Instead, terminate TLS traffic at the component. In this case, the certificate that is mount to the component is used. Therefore, you need to configure the gateway TLS of the Pulsar broker in the values.yaml YAML file, as shown below.
Currently, the PASSTHROUGH TLS mode is not available for the StreamNative Console. You still need to configure the certSecretName option for the StreamNative Console.
  • [3] certSecretName: the name of the Kubernetes Secret. It can also either be a certificate issued by the internal or the external issuer. If neither the internal nor the external issuer is configured, there should be a Secret named certSecretName that contains certificates under the Istio Gateway namespace.
  • [4][5] external_domain: Pulsar Broker generates the Pod domain names based on the advertisedDomain field (the domain of the Pulsar Broker). Therefore, you must include the suffix of the external domains for Pulsar Broker and control center in the domain.suffix. As shown below, if the external domains for Pulsar Broker and control center are set to broker.example.com and control_center.example.com respectively, thedomain.suffix should be set to example.com.

Enable Istio Gateway and expose service through the Pulsar Proxy

This example enables the Istio Gateway, specifies values for certSecretName (the name of the Kubernetes secret that was created in the previous step), and defines the URLs for the Pulsar Proxy and StreamNative Console.
  1. Configure the Istio Gateway for StreamNative Platform in the values.yaml YAML file as follows:
    • [1] namespace: the default namespace for the Istio gateway. By default, it is set to istio-system.
    • [2] certSecretName: the name of the Kubernetes Secret. It can also either be a certificate issued by the internal or the external issuer. If neither the internal nor the external issuer is configured, there should be a Secret named certSecretName that contains certificates under the Istio Gateway namespace.
    • [3] type: the method of exposing the Pulsar Proxy service. It should be set to IstioGateway when Istio is enabled.
    • [4][5] external_domain: if the external domains for the Pulsar Proxy and the control center are set to proxy.example.com and control_center.example.com respectively, thedomain.suffix should be set to example.com.
  2. Apply the new configuration.

Access ingress services

This section describes how to access KoP, MoP, the Pulsar broker, StreamNative Console, and Grafana after installing Istio and Istio Ingress Gateway, and enabling Istio Gateway.

Access KoP

To access KoP, follow these steps.
  1. Configure the Kafka client. a. Create a certificate in the JKS format. This example creates a self-signed JKS certificate.
If you use a certificate signed by a public issuer, you do not need to configure the certificate on the Kafka client.
b. Create the Kafka client configuration file (client.properties).
  1. Configure the DNS address. a. Get the related host domains.
    The output looks similar to:
    b. Configure the DNS address in /etc/hosts.
  2. Connect to KoP via the Kafka client. a. Start a Kafka producer and send a message from the Kafka producer.
    b. Open a new terminal window and enter the Kafka Pod.
    c. Start a Kafka consumer.

Access MoP

To access MoP using the Eclipse Mosquitto MQTT CLI tool, follow these steps.
  1. Create a Kubernetes Secret (mqtt-cert) using the CA certificate that is generated in configure TLS Ingress Gateway.
If you use a certificate signed by a public issuer, you do not need to configure the certificate on MoP.
  1. Deploy an MQTT client Pod. a. Define an MQTT client Pod as below and save the YAML file (pod.yaml).
    b. Apply your configurations.
  2. Enter the MQTT client Pod and configure the DNS address in /etc/hosts.
  3. Connect to MoP using the MQTT client. a. Publish messages to the Pulsar cluster. i. Open a new terminal window and enter the MQTT client Pod.
    ii. Publish messages to the Pulsar cluster.
    b. Subscribe to messages from the Pulsar cluster. i. Open a new terminal window and enter the MQTT client Pod.
    ii. Subscribe to messages from the Pulsar cluster.

Access AoP

To access AoP using the RabbitMQ client, follow these steps.
  1. Create a Pulsar namespace and set the retention policy for the namespace. This example shows how to use the pulsar-admin CLI tool to create a Pulsar namespace named vhost1 and set the retention size and retention time to 100M and 2 days, respectively.
  2. Create a Maven project and add a dependency to the RabbitMQ client.
  3. Connect to AoP using the RabbitMQ client.
    • [1] connectionFactory.setVirtualHost: represent the Pulsar namespace for AoP.
    • [2] connectionFactory.setHost: represent the endpoint for Pulsar service.
    • [3] connectionFactory.setPort: represent the port ID for AoP. It is set to port 5671.

Access a Pulsar broker

To access a Pulsar broker, follow these steps:
  1. Create a certificate. For details, see configure TLS Ingress Gateway.
If you use a certificate signed by a public issuer, you do not need to configure the certificate on the Pulsar broker.
  1. Update the Pulsar broker configuration file (conf/client.conf).
  2. Validate the configuration by producing and consuming data with the pulsar-client CLI tool.

Access the StreamNative Console

  1. Create a certificate. For details, see configure TLS Ingress Gateway.
If you use a certificate signed by a public issuer, you do not need to configure the certificate on the StreamNative Console.
  1. Verify whether you can connect to the StreamNative Console using the self-signed certificate.

Access Grafana

  1. Create a certificate. For details, see configure TLS Ingress Gateway.
If you use a certificate signed by a public issuer, you do not need to configure the certificate on Grafana.
  1. Verify whether you can connect to the Grafana service using the self-signed certificate.

Istio Ambient Mode

Starting with sn-operator v0.13, you can deploy Pulsar with Istio ambient mode — a sidecarless data plane architecture that replaces per-pod Envoy sidecars with a shared node-level ztunnel DaemonSet.

Benefits

  • Reduced mesh overhead: No per-pod sidecar containers (saves ~100MB memory + 0.1 CPU per pod)
  • Eliminates startup delays: No sidecar injection or init container waits before the application starts
  • Simpler operations: New pods join the mesh via labels without sidecar injection
  • Full feature parity: All Istio resources (Gateway, VirtualService, PeerAuthentication, AuthorizationPolicy) continue to work
Ambient mode uses ztunnel for L4 mTLS only. L7 features such as HTTP routing and TLS termination are handled by the existing Istio Gateway, which has its own Envoy proxy. No waypoint proxy is needed for Pulsar workloads.

Prerequisites

  • Istio 1.24+ with ambient mode enabled and the ztunnel DaemonSet running on your cluster. Refer to the Istio Ambient Mode documentation for installation and configuration instructions specific to your environment.
Verify the ztunnel DaemonSet is running:

Configure Ambient Mode

Add the following configuration to your values.yaml file:
The chart propagates this setting to all components (Broker, Proxy, BookKeeper, ZooKeeper) via the Helm templates. The chart automatically sets the correct pod labels — istio.io/dataplane-mode: ambient instead of sidecar.istio.io/inject: "true" — based on the dataplaneMode value. Apply the configuration:

Migrate from Sidecar to Ambient Mode

To migrate an existing sidecar-mode deployment to ambient mode:
  1. Ensure Istio 1.24+ with ambient mode is running in your cluster.
  2. Update your values.yaml to add dataplaneMode:
  3. Apply the change:
  4. Monitor the rolling update by checking that each component CR reaches ready state:
    Wait until the READY REPLICAS column matches REPLICAS for each component.
  5. Verify ambient enrollment (see Verify Ambient Mode Deployment below).
During the rolling update, mTLS is maintained. Istio supports interoperability between ztunnel (ambient) and sidecar proxies, so old and new pods can communicate throughout the migration.
Roll back to sidecar mode: To revert to sidecar mode, remove the dataplaneMode field (or set it to "sidecar") in your values.yaml and run helm upgrade again. If you previously removed namespace-level sidecar injection labels (e.g., istio-injection=enabled), restore them as well.

Verify Ambient Mode Deployment

Verify that pods are running without sidecars (1/1 containers instead of 2/2):
Verify pods have the ambient mode label:
Each pod should show ambient in the output.

Ambient Mode Troubleshooting