<p>I have configured a Kafka Cluster with Strimzi. I have enabled tls authentication and I have exposed the service with NodePort.</p>
<p>After that I have exported my ca and my password to generate a JKS to connect with Kafka. But the problem is that I'm having the next error:</p>
<blockquote>
<p>java.security.cert.CertificateException: No subject alternative names
matching IP address 172.26.195.44 found</p>
</blockquote>
<p>To export password and ca:</p>
<pre><code>kubectl get secret kafka-cluster-cluster-ca-cert -o jsonpath='{.data.ca\.crt}' | base64 --decode &gt; ca.crt
kubectl get secret kafka-cluster-cluster-ca-cert -o jsonpath='{.data.ca\.password}' | base64 --decode &gt; ca.password
</code></pre>
<p>To generate the jks I have made these steps:</p>
<pre><code>keytool -genkey -alias kafka -keyalg RSA -keystore kafka.jks -keysize 2048
keytool -importkeystore -srckeystore kafka.jks -destkeystore kafka.jks -deststoretype pkcs12  

export CERT_FILE_PATH=ca.crt
export CERT_PASSWORD_FILE_PATH=ca.password
export KEYSTORE_LOCATION=kafka.jks
export PASSWORD=`cat $CERT_PASSWORD_FILE_PATH`
export CA_CERT_ALIAS=strimzi-kafka-cert

sudo keytool -importcert -alias $CA_CERT_ALIAS -file $CERT_FILE_PATH -keystore $KEYSTORE_LOCATION -keypass $PASSWORD
sudo keytool -list -alias $CA_CERT_ALIAS -keystore $KEYSTORE_LOCATION
</code></pre>
<p>Also I have tried adding -ext SAN=dns:test.abc.com,ip:172.26.195.44</p>
<p>Any idea about this?</p>

<p>As described in the docs, when using node ports listeners, you have to by default disable the hostname verification in your client. The reason is that the node address is not known upfront to add it to the certificates and including all nodes would often not work because the worker nodes might come and go.</p>
<p>If you know the node addresses upfront because of your cluster configuration, you can have them added to the certificates using the <a href="https://strimzi.io/docs/operators/latest/full/using.html#property-listener-config-altnames-reference" rel="nofollow noreferrer"><code>alternativeNames</code> option</a> in the Kafka CR.</p>
