Skip to content

Commit 8cadb8a

Browse files
authored
docs(kafka): refactor of kafka configuration content (#12298)
Signed-off-by: prmellor <pmellor@redhat.com> Signed-off-by: PaulRMellor <47596553+PaulRMellor@users.noreply.github.com>
1 parent 7cc84dc commit 8cadb8a

14 files changed

+563
-221
lines changed

documentation/assemblies/configuring/assembly-config.adoc

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,24 @@ This provides a convenient mechanism for resources to be labeled as required.
4848
//How to access examples
4949
include::../../modules/configuring/con-config-examples.adoc[leveloffset=+1]
5050

51-
//`Kafka` resource config
51+
//`Kafka` resource core config
5252
include::../../modules/configuring/con-config-kafka-kraft.adoc[leveloffset=+1]
53-
//setting static broker limits
53+
// Securing client connections
54+
include::../../modules/configuring/con-config-kafka-securing-client-connections.adoc[leveloffset=+2]
55+
// Configuring authorization
56+
include::../../modules/configuring/con-config-kafka-authorization.adoc[leveloffset=+2]
57+
// Configuring Kafka broker behavior
58+
include::../../modules/configuring/con-config-kafka-broker-configuration.adoc[leveloffset=+2]
59+
// Automating Kafka resource distribution and storage management
60+
include::../../modules/configuring/con-kafka-cruise-control.adoc[leveloffset=+2]
61+
// Capturing consumer lag metrics
62+
include::../../modules/configuring/con-kafka-exporter.adoc[leveloffset=+2]
63+
// Controlling throughput and storage usage
64+
include::../../modules/managing/con-choosing-a-quota-plugin.adoc[leveloffset=+2]
5465
include::../../modules/managing/proc-setting-broker-limits.adoc[leveloffset=+2]
55-
//Delete kafka nodes using annotations
66+
// Recovering from broker storage issues
67+
include::../../modules/configuring/con-kafka-recovering-brokers.adoc[leveloffset=+2]
68+
// Deleting Kafka nodes using annotations
5669
include::../../modules/configuring/proc-manual-delete-pod-pvc-kafka.adoc[leveloffset=+2]
5770

5871
//configuring node pools

documentation/assemblies/configuring/assembly-logging-configuration.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// assembly-config.adoc
66

77
:_mod-docs-content-type: ASSEMBLY
8-
[id='external-logging_{context}']
8+
[id='assembly-logging-configuration-{context}']
99
= Configuring logging
1010

1111
[role="_abstract"]
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
:_mod-docs-content-type: CONCEPT
2+
3+
// Module included in the following assemblies:
4+
//
5+
// assembly-config.adoc
6+
7+
[id='con-kafka-authorization-{context}']
8+
= Configuring authorization
9+
10+
[role="_abstract"]
11+
Control what authenticated clients can do in a Kafka cluster by enabling authorization on Kafka brokers.
12+
Authorization is configured in the `Kafka` custom resource and enforced by the Kafka broker.
13+
14+
Authorization is separate from listener authentication.
15+
Authentication verifies a client identity.
16+
Authorization controls which operations the client is allowed to perform.
17+
18+
Kafka supports the following authorization types:
19+
20+
* `simple`
21+
* `custom`
22+
23+
The `simple` authorization type uses the Kafka `StandardAuthorizer` plugin.
24+
25+
The following examples show how to enable authorization on Kafka brokers.
26+
27+
== Enabling simple authorization
28+
29+
Simple authorization enables ACL-based access control using Kafka’s built-in authorizer.
30+
31+
[source,yaml,subs="+attributes"]
32+
----
33+
spec:
34+
kafka:
35+
# Authorization (optional)
36+
authorization:
37+
type: simple
38+
----
39+
40+
* `spec.kafka.authorization.type: simple` enables ACL-based authorization using the Kafka `StandardAuthorizer`.
41+
* Access to Kafka resources is controlled using ACL rules.
42+
43+
== Configuring super users
44+
45+
You can define super users that are allowed to perform all operations, regardless of ACL rules.
46+
Use super users for Kafka administrator identities and internal components that must always be able to operate.
47+
48+
[source,yaml,subs="+attributes"]
49+
----
50+
spec:
51+
kafka:
52+
# Authorization (optional)
53+
authorization:
54+
type: simple
55+
superUsers:
56+
- CN=kafka-admin
57+
- my-team-admin
58+
----
59+
60+
* `spec.kafka.authorization.superUsers` defines super user identities.
61+
* The identity format must match the principal used by your authentication mechanism.
62+
63+
The `CN=` prefix shown in the example applies to mTLS authentication, where the principal is derived from the certificate subject.
64+
Other authentication mechanisms, such as SASL-based authentication, use different principal formats.
65+
66+
== Enabling custom authorization
67+
68+
Custom authorization allows the use of a custom authorizer implementation.
69+
Use custom authorization when you need to integrate Kafka with an external authorization system.
70+
71+
[source,yaml,subs="+attributes"]
72+
----
73+
spec:
74+
kafka:
75+
# Authorization (optional)
76+
authorization:
77+
type: custom
78+
authorizerClass: com.example.CustomAuthorizer
79+
----
80+
81+
* `spec.kafka.authorization.type: custom` enables a custom authorization implementation.
82+
* `spec.kafka.authorization.authorizerClass` specifies the fully qualified class name of the custom authorizer.
83+
84+
Authorization configuration enables enforcement of access control on the Kafka broker.
85+
User identities, credentials, and ACL rules are configured separately.
86+
87+
For step-by-step procedures and examples for configuring authorized access, see
88+
xref:assembly-securing-access-{context}[Securing access to a Kafka cluster].
89+
90+
For details of authorization configuration options, see the
91+
link:{BookURLConfiguring}#type-Kafka-authorization-simple-reference[`KafkaAuthorizationSimple` schema reference^] and
92+
link:{BookURLConfiguring}#type-Kafka-authorization-custom-reference[`KafkaAuthorizationCustom` schema reference^].
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
:_mod-docs-content-type: CONCEPT
2+
3+
// Module included in the following assemblies:
4+
//
5+
// assembly-config.adoc
6+
7+
[id='con-kafka-broker-configuration-{context}']
8+
= Configuring Kafka broker operation
9+
10+
[role="_abstract"]
11+
Control how Kafka brokers operate by configuring broker properties in the `Kafka` custom resource.
12+
Broker configuration affects availability and performance of the cluster.
13+
14+
Broker configuration is applied using the `spec.kafka.config` property.
15+
Only Kafka configuration properties that are not managed directly by Strimzi can be set.
16+
Strimzi validates and applies these properties during reconciliation.
17+
18+
Use broker configuration to:
19+
20+
* Replicate topics for high availability
21+
* Improve throughput or request handling
22+
* Optimize performance for high-latency or high-bandwidth networks
23+
* Control disk usage and log retention behavior
24+
* Reduce unnecessary rebalances or leadership changes
25+
26+
Broker configuration options must be used in the correct combinations to meet your availability and fault-tolerance requirements.
27+
Kafka provides many additional broker properties for more granular configuration.
28+
However, certain properties are managed directly by Strimzi and cannot be set within this config property.
29+
For more information, see the link:{BookURLConfiguring}#type-KafkaClusterSpec-reference[`KafkaClusterSpec` schema reference^].
30+
31+
Broker tuning is workload-dependent.
32+
Test changes in a non-production environment before applying them to a production cluster.
33+
A practical approach is to adjust configuration incrementally and monitor the impact using broker and client metrics.
34+
For detailed guidance on selecting and tuning broker configuration properties, see
35+
xref:con-broker-config-properties-{context}[Kafka broker configuration tuning].
36+
37+
== Adding broker configuration
38+
39+
Kafka broker configuration is defined as key-value pairs under `spec.kafka.config`.
40+
41+
[source,yaml,subs="+attributes"]
42+
----
43+
spec:
44+
kafka:
45+
# Kafka configuration (recommended)
46+
config:
47+
offsets.topic.replication.factor: 3
48+
transaction.state.log.replication.factor: 3
49+
transaction.state.log.min.isr: 2
50+
default.replication.factor: 3
51+
min.insync.replicas: 2
52+
----
53+
54+
* `spec.kafka.config` defines Kafka broker properties as key-value pairs.
55+
* `offsets.topic.replication.factor` sets the replication factor for the consumer offsets topic.
56+
* `transaction.state.log.replication.factor` sets the replication factor for the transaction state log.
57+
* `transaction.state.log.min.isr` sets the minimum number of in-sync replicas (ISR) required for the transaction state log.
58+
* `default.replication.factor` sets the default replication factor for topics that do not specify one.
59+
* `min.insync.replicas` sets the minimum number of in-sync replicas (ISR) required to acknowledge writes.
60+
61+
WARNING: If you remove the `min.insync.replicas` property from `spec.kafka.config`,
62+
the Cluster Operator forces Kafka to fall back to the default value of `1`.
63+
To ensure fault tolerance, explicitly set `min.insync.replicas` to a value greater than `1`.

0 commit comments

Comments
 (0)