<p>Currently my application has bitnami container for kafka. I want to change the number of partitions in a topic to three. But I don't know where should I do that. When I go to minikube dashboard, I see that there is a KAFKA_CFG_NUM_PARTITIONS. But I don't know where to define that in my project. I have below files</p>
<ol>
<li><p>Chart.yaml which has</p>
<p>apiVersion: v2
name: infra
type: application
sources:
- https:/examplePorject
dependencies:
- name: kafka
version: 14.x.x
respository: <a href="https://charts.bitnami.com/bitnami" rel="nofollow noreferrer">https://charts.bitnami.com/bitnami</a></p>
</li>
<li><p>values.yaml
kafka:
url: infra-kafka-0.infra-headless:9092</p>
</li>
<li><p>statefulset.yaml</p>
</li>
</ol>
<p>I found that there is a property <strong>environment</strong>  and that defines KAFKA_CFG_NUM_PARTITIONS inside of it.</p>

user3462941
<p>Apparently, this ENV variable <code>KAFKA_CFG_NUM_PARTITIONS</code> sets the server config <code>num.partitions</code>: <a href="https://docs.confluent.io/platform/current/installation/configuration/broker-configs.html#brokerconfigs_num.partitions" rel="nofollow noreferrer">https://docs.confluent.io/platform/current/installation/configuration/broker-configs.html#brokerconfigs_num.partitions</a></p>
<p>Which is the default number of partitions that auto created topics will have.</p>
<p>To increase the number of partitions of an existing topic, you can use the <code>kafka-topics</code> tool:</p>
<pre><code>./bin/kafka-topics.sh --alter --bootstrap-server &lt;kafka&gt;:9092 --topic &lt;topic-name&gt; --partitions &lt;new-num-partitions&gt;
</code></pre>
