7.7. Deploying Kafka Bridge


Kafka Bridge provides an API for integrating HTTP-based clients with a Kafka cluster.

7.7.1. Deploying Kafka Bridge to your OpenShift cluster

This procedure shows how to deploy a Kafka Bridge cluster to your OpenShift cluster using the Cluster Operator.

The deployment uses a YAML file to provide the specification to create a KafkaBridge resource.

Streams for Apache Kafka provides example configuration files. In this procedure, we use the following example file:

  • examples/bridge/kafka-bridge.yaml

Procedure

  1. Deploy Kafka Bridge to your OpenShift cluster:

    oc apply -f examples/bridge/kafka-bridge.yaml
  2. Check the status of the deployment:

    oc get pods -n <my_cluster_operator_namespace>

    Output shows the deployment name and readiness

    NAME                       READY  STATUS   RESTARTS
    my-bridge-bridge-<pod_id>  1/1    Running  0

    my-bridge is the name of the Kafka Bridge cluster.

    A pod ID identifies each pod created.

    With the default deployment, you install a single Kafka Bridge pod.

    READY shows the number of replicas that are ready/expected. The deployment is successful when the STATUS displays as Running.

7.7.2. Exposing the Kafka Bridge service to your local machine

Use port forwarding to expose the Kafka Bridge service to your local machine on http://localhost:8080.

注記

Port forwarding is only suitable for development and testing purposes.

Procedure

  1. List the names of the pods in your OpenShift cluster:

    oc get pods -o name
    
    pod/kafka-consumer
    # ...
    pod/my-bridge-bridge-<pod_id>
  2. Connect to the Kafka Bridge pod on port 8080:

    oc port-forward pod/my-bridge-bridge-<pod_id> 8080:8080 &
    注記

    If port 8080 on your local machine is already in use, use an alternative HTTP port, such as 8008.

API requests are now forwarded from port 8080 on your local machine to port 8080 in the Kafka Bridge pod.

7.7.3. Accessing the Kafka Bridge outside of OpenShift

After deployment, the Kafka Bridge can only be accessed by applications running in the same OpenShift cluster. These applications use the <kafka_bridge_name>-bridge-service service to access the API.

If you want to make the Kafka Bridge accessible to applications running outside of the OpenShift cluster, you can expose it manually by creating one of the following features:

  • LoadBalancer or NodePort type services
  • Ingress resources (Kubernetes only)
  • OpenShift routes (OpenShift only)

If you decide to create Services, use the labels from the selector of the <kafka_bridge_name>-bridge-service service to configure the pods to which the service will route the traffic:

  # ...
  selector:
    strimzi.io/cluster: kafka-bridge-name 
1

    strimzi.io/kind: KafkaBridge
  #...
1
Name of the Kafka Bridge custom resource in your OpenShift cluster.

7.7.4. List of Kafka Bridge cluster resources

The following resources are created by the Cluster Operator in the OpenShift cluster:

<bridge_cluster_name>-bridge
Deployment which is in charge to create the Kafka Bridge worker node pods.
<bridge_cluster_name>-bridge-service
Service which exposes the REST interface of the Kafka Bridge cluster.
<bridge_cluster_name>-bridge-config
ConfigMap which contains the Kafka Bridge ancillary configuration and is mounted as a volume by the Kafka broker pods.
<bridge_cluster_name>-bridge
Pod Disruption Budget configured for the Kafka Bridge worker nodes.
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

Red Hat ドキュメントについて

Legal Notice

Theme

© 2026 Red Hat
トップに戻る