// This assembly is included in the following assemblies:
//
// configuring/configuring.adoc

[id='overview-{context}']
= Configuring a deployment

[role="_abstract"]
Configure and manage a Strimzi deployment to your precise needs using Strimzi custom resources.
Strimzi 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 link:{BookURLConfiguring}[Strimzi 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:

* Bootstrap servers for host/port connection to a Kafka cluster
* Metrics configuration
* Healthchecks and liveness probes
* Resource limits and requests (CPU/Memory)
* Logging frequency
* JVM options for maximum and minimum memory allocation
* Adding additional volumes and volume mounts

.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 xref:proc-renewing-ca-certs-manually-{context}[Renewing CA certificates manually] and xref:proc-replacing-private-keys-{context}[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 `kubectl` to apply the changes to a custom resource configuration file:

.Applying changes to a resource configuration file
[source,shell,subs=+quotes]
----
kubectl apply -f <kafka_configuration_file>
----

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

//How to access examples
include::../../modules/configuring/con-config-examples.adoc[leveloffset=+1]

//`Kafka` resource config
include::../../modules/configuring/con-config-kafka-kraft.adoc[leveloffset=+1]
//setting static broker limits
include::../../modules/managing/proc-setting-broker-limits.adoc[leveloffset=+2]
//Delete kafka nodes using annotations
include::../../modules/configuring/proc-manual-delete-pod-pvc-kafka.adoc[leveloffset=+2]

//zookeeper-specific
include::../../modules/configuring/con-config-kafka-zookeeper.adoc[leveloffset=+1]
//Zookeeper's default configuration
include::../../modules/configuring/con-zookeeper-default-config.adoc[leveloffset=+2]
//Delete zookeeper nodes using annotations
include::../../modules/configuring/proc-manual-delete-pod-pvc-zookeeper.adoc[leveloffset=+2]

//configuring node pools
include::../../modules/configuring/con-config-node-pools.adoc[leveloffset=+1]
include::../../modules/configuring/proc-managing-node-pools-ids.adoc[leveloffset=+2]
include::../../modules/configuring/con-node-pools-racks.adoc[leveloffset=+2]
include::../../modules/configuring/proc-scaling-up-node-pools.adoc[leveloffset=+2]
include::../../modules/configuring/proc-scaling-down-node-pools.adoc[leveloffset=+2]
include::../../modules/configuring/proc-moving-node-pools.adoc[leveloffset=+2]
include::../../modules/configuring/con-config-node-pool-roles.adoc[leveloffset=+2]
include::../../modules/configuring/proc-splitting-node-pool-roles.adoc[leveloffset=+2]
include::../../modules/configuring/proc-joining-node-pool-roles.adoc[leveloffset=+2]
include::../../modules/configuring/proc-migrating-clusters-node-pools.adoc[leveloffset=+2]

//configuring storage
include::assembly-storage.adoc[leveloffset=+1]

//`Kafka` config for operators
include::../../modules/configuring/ref-kafka-entity-operator.adoc[leveloffset=+1]
//topic operator config
include::../../modules/configuring/con-configuring-topic-operator.adoc[leveloffset=+2]
//user operator config
include::../../modules/configuring/con-configuring-user-operator.adoc[leveloffset=+2]
//watched namespace config for topic and user operators
include::../../modules/configuring/proc-configuring-entity-operator-watched-namespace.adoc[leveloffset=+2]

//cluster operator config env vars
include::../../modules/operators/con-configuring-cluster-operator.adoc[leveloffset=+1]
//pausing reconciliation of custom resources
include::../../modules/operators/proc-pausing-reconciliation.adoc[leveloffset=+2]
//enabling leader election
include::../../assemblies/operators/assembly-using-multiple-cluster-operators.adoc[leveloffset=+2]
//cluster operator proxy config
include::../../modules/operators/proc-configuring-proxy-config-cluster-operator.adoc[leveloffset=+2]
//disabling FIPS mode
include::../../modules/operators/proc-disabling-fips-mode-cluster-operator.adoc[leveloffset=+2]

//`KafkaConnect` resource config
include::../../modules/configuring/con-config-kafka-connect.adoc[leveloffset=+1]
//running multiple Kafka Connect instances
include::../../modules/configuring/con-config-kafka-connect-multiple-instances.adoc[leveloffset=+2]
//if authorization is enabled, configure the Kafka Connect user for read/write access rights
include::../../modules/configuring/proc-config-kafka-connect-user-authorization.adoc[leveloffset=+2]

//`KafkaConnector` resource config
include::../../modules/configuring/con-config-kafka-connector.adoc[leveloffset=+1]
//Procedure to manually pause or stop a Kafka connector
include::../../modules/configuring/proc-manual-stop-pause-connector.adoc[leveloffset=+2]
//Procedure to manually restart a Kafka connector
include::../../modules/configuring/proc-manual-restart-connector.adoc[leveloffset=+2]
//Procedure to manually restart a Kafka connector task
include::../../modules/configuring/proc-manual-restart-connector-task.adoc[leveloffset=+2]
//procedure to list offsets
include::../../modules/configuring/proc-listing-connector-offsets.adoc[leveloffset=+2]
//procedure to alter offsets
include::../../modules/configuring/proc-altering-connector-offsets.adoc[leveloffset=+2]
//procedure to reset offsets
include::../../modules/configuring/proc-resetting-connector-offsets.adoc[leveloffset=+2]

//`KafkaMirrorMaker2` resource config
include::../../modules/configuring/con-config-mirrormaker2.adoc[leveloffset=+1]
//configuring replication modes 
include::../../modules/overview/con-overview-mirrormaker2.adoc[leveloffset=+2]
//running multiple MM2 instances
include::../../modules/configuring/con-config-mm2-multiple-instances.adoc[leveloffset=+1]
//configuring MM2 connectors
include::../../modules/configuring/con-config-mirrormaker2-connectors.adoc[leveloffset=+2]
//configuring MM2 connector producers and consumers
include::../../modules/configuring/con-config-mirrormaker2-producers-consumers.adoc[leveloffset=+2]
//increasing the number of tasks
include::../../modules/configuring/con-config-mirrormaker2-tasks-max.adoc[leveloffset=+2]
//handling of ACLs in replication
include::../../modules/configuring/con-config-mirrormaker2-acls.adoc[leveloffset=+2]
//securing connections to and from mirrormaker
include::../../modules/configuring/proc-config-mirrormaker2-securing-connection.adoc[leveloffset=+2]
//Procedure to manually pause or stop an MM2 connector
include::../../modules/configuring/proc-manual-stop-pause-mirrormaker2-connector.adoc[leveloffset=+2]
//Procedure to restart an MM2 connector
include::../../modules/configuring/proc-manual-restart-mirrormaker2-connector.adoc[leveloffset=+2]
//Procedure to restart an MM2 connector task
include::../../modules/configuring/proc-manual-restart-mirrormaker2-connector-task.adoc[leveloffset=+2]

//`KafkaMirrorMaker` resource config
include::../../modules/configuring/con-config-mirrormaker.adoc[leveloffset=+1]

//`KafkaBridge` resource config
include::../../modules/configuring/con-config-kafka-bridge.adoc[leveloffset=+1]

//configuring CPU and memory resources and limits
include::../../modules/configuring/con-config-resources.adoc[leveloffset=+1]

//Kubernetes labels
include::../../modules/configuring/ref-kubernetes-labels.adoc[leveloffset=+1]

//scheduling separate Kafka pods 
include::assembly-scheduling.adoc[leveloffset=+1]

//disabling pod disruption budgets
include::../../modules/configuring/proc-disable-pod-disruption-budget-generation.adoc[leveloffset=+1]

//configuring log levels
include::assembly-logging-configuration.adoc[leveloffset=+1]

//loading configuration from configmaps for certain types of data
include::../../modules/configuring/con-configuration-points-configmaps.adoc[leveloffset=+1]

//loading configuration from external sources for all Kafka components
include::assembly-external-config.adoc[leveloffset=+1]

//customizing Kubernetes resources like Deployment etc
include::assembly-customizing-kubernetes-resources.adoc[leveloffset=+1]