第9章 Configuring a deployment


Configure and manage a Streams for Apache Kafka deployment to your precise needs using Streams for Apache Kafka custom resources. Streams for Apache Kafka provides example custom resources with each release, allowing you to configure and create instances of supported Kafka components. Fine-tune your deployment by configuring custom resources to include additional features according to your specific requirements.

Use custom resources to configure and create instances of the following components:

  • Kafka clusters
  • Kafka Connect clusters
  • Kafka MirrorMaker
  • Kafka Bridge
  • Cruise Control

You can use configuration to manage your instances or modify your deployment to introduce additional features. New features are sometimes introduced through feature gates, which are controlled through operator configuration.

The Streams for Apache Kafka Custom Resource API Reference describes the properties you can use in your configuration.

Important Kafka configuration options

Through configuration of the Kafka resource, you can introduce the following:

  • Data storage
  • Rack awareness
  • Listeners for authenticated client access to the Kafka cluster
  • Topic Operator for managing Kafka topics
  • User Operator for managing Kafka users (clients)
  • Cruise Control for cluster rebalancing
  • Kafka Exporter for collecting lag metrics

Use KafkaNodePool resources to configure distinct groups of nodes within a Kafka cluster.

Common configuration

Common configuration is configured independently for each component, such as the following:

  • Metrics configuration
  • Healthchecks and liveness probes
  • Resource limits and requests (CPU/Memory)
  • Logging frequency
  • JVM options for maximum and minimum memory allocation

Config maps to centralize configuration

For specific areas of configuration, namely metrics, logging, and external configuration for Kafka Connect connectors, you can also use ConfigMap resources. By using a ConfigMap resource to incorporate configuration, you centralize maintenance. You can also use configuration providers to load configuration from external sources, which we recommend for supplying the credentials for Kafka Connect connector configuration.

TLS certificate management

When deploying Kafka, the Cluster Operator automatically sets up and renews TLS certificates to enable encryption and authentication within your cluster. If required, you can manually renew the cluster and clients CA certificates before their renewal period starts. You can also replace the keys used by the cluster and clients CA certificates. For more information, see Renewing CA certificates manually and Replacing private keys.

Applying changes to a custom resource configuration file

You add configuration to a custom resource using spec properties. After adding the configuration, you can use oc to apply the changes to a custom resource configuration file:

Applying changes to a resource configuration file

oc apply -f <kafka_configuration_file>

注記

Labels applied to a custom resource are also applied to the OpenShift resources making up its cluster. This provides a convenient mechanism for resources to be labeled as required.

9.1. Using example configuration files

Further enhance your deployment by incorporating additional supported configuration. Example configuration files are provided with the downloadable release artifacts from the Streams for Apache Kafka software downloads page.

The example files include only the essential properties and values for custom resources by default. You can download and apply the examples using the oc command-line tool. The examples can serve as a starting point when building your own Kafka component configuration for deployment.

注記

If you installed Streams for Apache Kafka using the Operator, you can still download the example files and use them to upload configuration.

The release artifacts include an examples directory that contains the configuration examples.

Example configuration files provided with Streams for Apache Kafka

examples
├── user 
1

├── topic 
2

├── security 
3

│   ├── tls-auth
│   ├── scram-sha-512-auth
│   └── keycloak-authorization
├── mirror-maker 
4

├── metrics 
5

├── kafka 
6

│   └── kraft 
7

├── cruise-control 
8

├── connect 
9

└── bridge 
10

1
KafkaUser custom resource configuration, which is managed by the User Operator.
2
KafkaTopic custom resource configuration, which is managed by Topic Operator.
3
Authentication and authorization configuration for Kafka components. Includes example configuration for TLS and SCRAM-SHA-512 authentication. The Red Hat build of Keycloak example includes Kafka custom resource configuration and a Red Hat build of Keycloak realm specification. You can use the example to try Red Hat build of Keycloak authorization services. There is also an example with enabled oauth authentication and keycloak authorization metrics.
4
KafkaMirrorMaker and KafkaMirrorMaker2 custom resource configurations for a deployment of MirrorMaker. Includes example configuration for replication policy and synchronization frequency.
5
Metrics configuration, including Prometheus installation and Grafana dashboard files.
6
Kafka and KafkaNodePool custom resource configurations for a deployment of Kafka clusters that use ZooKeeper mode. Includes example configuration for an ephemeral or persistent single or multi-node deployment.
7
Kafka and KafkaNodePool configurations for a deployment of Kafka clusters that use KRaft (Kafka Raft metadata) mode.
8
Kafka custom resource with a deployment configuration for Cruise Control. Includes KafkaRebalance custom resources to generate optimization proposals from Cruise Control, with example configurations to use the default or user optimization goals.
9
KafkaConnect and KafkaConnector custom resource configuration for a deployment of Kafka Connect. Includes example configurations for a single or multi-node deployment.
10
KafkaBridge custom resource configuration for a deployment of Kafka Bridge.
Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

会社概要

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

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

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

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

Legal Notice

Theme

© 2026 Red Hat
トップに戻る