<p>As we know by default when we create a Strimzi-Kafka user, user gets its own user.crt &amp; user.key created in Kubernetes secrets-manager but I want to use my own user.crt &amp; user.key, is it feasible?</p>

<p>Rather than creating the user first then replacing with our own keys! Do we have option to pass our own crt, keys in runtime user create? Can we specify somehow in the deployment file?</p>

<p>From official doc: I got this <a href="https://strimzi.io/docs/master/#installing-your-own-ca-certificates-str" rel="nofollow noreferrer">https://strimzi.io/docs/master/#installing-your-own-ca-certificates-str</a> but it's for <code>kind:Kafka</code> not for <code>kind:KafkaUser</code> as we know <code>kind:KafkaUser</code> is used for user creation.</p>

<p>Am answering my question myself!</p>

<p><strong>STEP1:</strong></p>

<pre><code>kubectl -n &lt;namespace&gt; create secret generic &lt;ca-cert-secret&gt; --from-file=ca.crt=&lt;ca-cert-file&gt;
</code></pre>

<p><em>Eg:</em></p>

<pre><code>kubectl -n kafka create secret generic custom-strimzi-user --from-file=ca.crt=ca-decoded.crt --from-file=user.crt=user-decoded.crt --from-file=user.key=user-decoded.key -o yaml
</code></pre>

<p><strong>STEP2:</strong> </p>

<pre><code>kubectl -n &lt;namespace&gt; label secret &lt;ca-cert-secret&gt; strimzi.io/kind=&lt;Kafka or KafkaUser&gt; strimzi.io/cluster=&lt;my-cluster&gt;
</code></pre>

<p><em>Eg:</em></p>

<pre><code>kubectl -n kafka label secret custom-strimzi-user strimzi.io/kind=KafkaUser strimzi.io/cluster=kafka
</code></pre>

<p><strong>STEP3</strong>: Now to Enable ACL &amp; TLS for above created user:      </p>

<p>Apply Strimzi officially provided <strong>create user yaml</strong> deployment file (<strong>kind</strong>:<strong>KafkaUser</strong>) format after replacing the user name with one created from above, then execute :</p>

<pre><code>kubectl apply -f kafka-create-user.yml
</code></pre>

<p><strong>Note:</strong> Here if we run  <code>kubectl apply -f kafka-create-user.yml</code> before creating custom user as in STEP1 &amp; STEP2 then Strimzi create a user with its own <code>user.crt</code> &amp; <code>user.key</code></p>

<p>FYI above what I shared is for user custom <strong>crt</strong> &amp; user custom <strong>key</strong> but for operator cluster CA (crt &amp; key) we have official doc here: <a href="https://strimzi.io/docs/master/#installing-your-own-ca-certificates-str" rel="nofollow noreferrer">https://strimzi.io/docs/master/#installing-your-own-ca-certificates-str </a>  </p>

<p>Regards,
Sudhir Tataraju</p>
