// This assembly is included in the following assemblies:
//
// assembly-deployment-configuration-kafka.adoc

// Save the context of the assembly that is including this one.
// This is necessary for including assemblies in assemblies.
// See also the complementary step on the last line of this file.
:parent-context: {context}

[id='assembly-storage-{context}']
= Kafka and Zookeeper storage

Kafka brokers and Zookeeper are stateful applications.
They need to store data on disks.
{ProductName} allows you to configure the type of storage, which they want to use for Kafka and Zookeeper.
Storage configuration is mandatory and has to be specified in every `Kafka` resource.

Storage can be configured using the `storage` property in following resources:

* `Kafka.spec.kafka`
* `Kafka.spec.zookeeper`

{ProductName} supports two types of storage:

* Ephemeral
* Persistent

The type of storage is specified in the `type` field.

IMPORTANT: Once the Kafka cluster is deployed, the storage cannot be changed.

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

include::ref-storage-ephemeral.adoc[leveloffset=+1]

include::ref-storage-persistent.adoc[leveloffset=+1]

.Additional resources

* For more information about ephemeral storage, see xref:type-EphemeralStorage-reference[ephemeral storage schema reference].
* For more information about persistent storage, see xref:type-PersistentClaimStorage-reference[persistent storage schema reference].
* For more information about the schema for `Kafka`, see xref:type-Kafka-reference[`Kafka` schema reference].

:context: {parent-context}
