You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/assemblies/configuring/assembly-config.adoc
+40-68Lines changed: 40 additions & 68 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,6 @@
8
8
[role="_abstract"]
9
9
Configure and manage a Strimzi deployment to your precise needs using Strimzi custom resources.
10
10
Strimzi provides example custom resources with each release, allowing you to configure and create instances of supported Kafka components.
11
-
Fine-tune your deployment by configuring custom resources to include additional features according to your specific requirements.
12
11
13
12
Use custom resources to configure and create instances of the following components:
14
13
@@ -23,50 +22,22 @@ New features are sometimes introduced through feature gates, which are controlle
23
22
24
23
The link:{BookURLConfiguring}[Strimzi Custom Resource API Reference^] describes the properties you can use in your configuration.
25
24
26
-
.Important Kafka configuration options
27
-
Through configuration of the `Kafka` resource, you can introduce the following:
25
+
.Centralizing configuration
28
26
29
-
* Data storage
30
-
* Rack awareness
31
-
* Listeners for authenticated client access to the Kafka cluster
32
-
* Topic Operator for managing Kafka topics
33
-
* User Operator for managing Kafka users (clients)
34
-
* Cruise Control for cluster rebalancing
35
-
* Kafka Exporter for collecting lag metrics
27
+
For key configuration areas, such as metrics, logging, and external Kafka Connect connector settings, you can centralize management as follows:
36
28
37
-
Use `KafkaNodePool` resources to configure distinct groups of nodes within a Kafka cluster.
29
+
* xref:configuration-points-config-maps-str[Using `ConfigMap` resources to incorporate configuration].
30
+
* xref:assembly-loading-config-with-providers-str[Using configuration providers to load configuration from external sources].
38
31
39
-
.Common configuration
40
-
Common configuration is configured independently for each component, such as the following:
41
-
42
-
* Bootstrap servers for host/port connection to a Kafka cluster
43
-
* Metrics configuration
44
-
* Healthchecks and liveness probes
45
-
* Resource limits and requests (CPU/Memory)
46
-
* Logging frequency
47
-
* JVM options for maximum and minimum memory allocation
48
-
* Adding additional volumes and volume mounts
49
-
50
-
.Config maps to centralize configuration
51
-
For specific areas of configuration, namely metrics, logging, and external configuration for Kafka Connect connectors, you can also use `ConfigMap` resources.
52
-
By using a `ConfigMap` resource to incorporate configuration, you centralize maintenance.
53
-
You can also use configuration providers to load configuration from external sources, which we recommend for supplying the credentials for Kafka Connect connector configuration.
32
+
We recommend configuration providers for securely supplying Kafka Connect connector credentials.
54
33
55
34
.TLS certificate management
35
+
56
36
When deploying Kafka, the Cluster Operator automatically sets up and renews TLS certificates to enable encryption and authentication within your cluster.
57
37
If required, you can manually renew the cluster and clients CA certificates before their renewal period starts.
58
38
You can also replace the keys used by the cluster and clients CA certificates.
59
-
For more information, see xref:proc-renewing-ca-certs-manually-{context}[Renewing CA certificates manually] and xref:proc-replacing-private-keys-{context}[Replacing private keys].
60
39
61
-
.Applying changes to a custom resource configuration file
62
-
You add configuration to a custom resource using `spec` properties.
63
-
After adding the configuration, you can use `kubectl` to apply the changes to a custom resource configuration file:
64
-
65
-
.Applying changes to a resource configuration file
66
-
[source,shell,subs=+quotes]
67
-
----
68
-
kubectl apply -f <kafka_configuration_file>
69
-
----
40
+
For more information, see xref:proc-renewing-ca-certs-manually-{context}[Renewing CA certificates manually] and xref:proc-replacing-private-keys-{context}[Replacing private keys].
70
41
71
42
NOTE: Labels applied to a custom resource are also applied to the Kubernetes resources making up its cluster.
72
43
This provides a convenient mechanism for resources to be labeled as required.
// This assembly is included in the following assemblies:
2
+
//
3
+
// assembly-config.adoc
4
+
5
+
[id='con-common-config-{context}']
6
+
= Applying optional common configuration
7
+
You can further configure Strimzi components by applying any of the following optional common configuration settings.
8
+
Common configuration is configured independently for each component, such as the following:
9
+
10
+
* Resource limits and requests (Recommended)
11
+
* Metrics configuration
12
+
* Liveness and readiness probes
13
+
* JVM options for maximum and minimum memory allocation
14
+
* Adding additional volumes and volume mounts
15
+
* Template configuration for pods and containers
16
+
* Logging frequency
17
+
18
+
Advanced or specialized options include:
19
+
20
+
* Custom container images
21
+
* Rack awareness
22
+
* Distributed tracing
23
+
24
+
Configure common options for Strimzi custom resources in the `.spec` section of the custom resource.
25
+
For more information on these configuration options, refer to link:{BookURLConfiguring}[Common configuration properties^].
26
+
27
+
== Resource limits and requests (recommended)
28
+
29
+
To ensure stability and optimal performance for your Kafka clusters, we recommend defining CPU and memory resource limits and requests for all Strimzi containers.
30
+
By default, the Strimzi Cluster Operator does not set these values, but fine-tuning them based on your workload requirements helps performance and improves reliability.
31
+
32
+
.Example resource configuration
33
+
[source,yaml]
34
+
----
35
+
# ...
36
+
spec:
37
+
resources:
38
+
requests:
39
+
cpu: "1"
40
+
memory: 2Gi
41
+
limits:
42
+
cpu: "2"
43
+
memory: 2Gi
44
+
# ...
45
+
----
46
+
47
+
== Metrics configuration
48
+
49
+
Enable metrics collection for monitoring.
50
+
51
+
.Example metrics configuration
52
+
[source,yaml]
53
+
----
54
+
# ...
55
+
spec:
56
+
metricsConfig:
57
+
type: jmxPrometheusExporter
58
+
valueFrom:
59
+
configMapKeyRef:
60
+
name: my-metrics-config
61
+
key: kafka-metrics-config.yml
62
+
# ...
63
+
----
64
+
65
+
Configuration varies depending on the component and exporter used: Prometheus JMX Exporter or Strimzi Metrics Reporter.
66
+
For more information, see xref:assembly-metrics-str[Introducing metrics].
67
+
68
+
== Liveness and readiness probes
69
+
70
+
Configure health checks for the container.
71
+
72
+
.Example liveness and readiness probes
73
+
[source,yaml]
74
+
----
75
+
# ...
76
+
spec:
77
+
livenessProbe:
78
+
initialDelaySeconds: 15
79
+
timeoutSeconds: 5
80
+
readinessProbe:
81
+
initialDelaySeconds: 10
82
+
timeoutSeconds: 5
83
+
# ...
84
+
----
85
+
86
+
== JVM options
87
+
88
+
Configure the Java Virtual Machine (JVM) for the component.
89
+
To enable garbage collector (GC) logging, set `gcLoggingEnabled` to `true`.
90
+
91
+
.Example JVM options
92
+
[source,yaml]
93
+
----
94
+
# ...
95
+
spec:
96
+
jvmOptions:
97
+
-Xms: "512m"
98
+
-Xmx: "1g"
99
+
gcLoggingEnabled: true
100
+
# ...
101
+
----
102
+
103
+
== Additional volumes and mounts
104
+
105
+
Add extra volumes to the container and mount them in specific locations.
106
+
107
+
.Example additional volumes
108
+
[source,yaml]
109
+
----
110
+
# ...
111
+
spec:
112
+
kafka:
113
+
template:
114
+
pod:
115
+
volumes:
116
+
- name: example-secret
117
+
secret:
118
+
secretName: secret-name
119
+
- name: example-configmap
120
+
configMap:
121
+
name: config-map-name
122
+
kafkaContainer:
123
+
volumeMounts:
124
+
- name: example-secret
125
+
mountPath: /mnt/secret-volume
126
+
- name: example-configmap
127
+
mountPath: /mnt/cm-volume
128
+
# ...
129
+
----
130
+
131
+
NOTE: You can use `template` configuration to add other customizations to pods and containers, such as affinity and security context.
132
+
For more information, see xref:assembly-scheduling-str[Configuring pod scheduling] and xref:assembly-security-providers-str[Applying security context to Strimzi pods and containers].
133
+
134
+
== Custom container image
135
+
136
+
Override the default container image.
137
+
*Use only in special situations.*
138
+
139
+
.Example custom image
140
+
[source,yaml]
141
+
----
142
+
# ...
143
+
spec:
144
+
image: my-org/custom-kafka-image:latest
145
+
# ...
146
+
----
147
+
148
+
== Rack awareness
149
+
150
+
Enable rack-aware broker assignment to improve fault tolerance.
151
+
*This is a specialized option intended for a deployment within the same location, not across regions.*
152
+
153
+
.Example rack awareness configuration
154
+
[source,yaml]
155
+
----
156
+
# ...
157
+
spec:
158
+
rack:
159
+
topologyKey: topology.kubernetes.io/zone
160
+
# ...
161
+
----
162
+
163
+
== Distributed tracing configuration
164
+
165
+
Enable distributed tracing using OpenTelemetry to monitor Kafka component operations.
166
+
167
+
.Example tracing configuration
168
+
[source,yaml]
169
+
----
170
+
# ...
171
+
spec:
172
+
tracing:
173
+
type: opentelemetry
174
+
# ...
175
+
----
176
+
177
+
For more information see xref:assembly-distributed-tracing-str[Introducing distributed tracing].
0 commit comments