<p>My problem is very specific and I dont know how to achieve in kubernetes.</p>
<p>Im trying to configure an application called presto
<a href="https://prestodb.io/docs/current/security/internal-communication.html" rel="nofollow noreferrer">https://prestodb.io/docs/current/security/internal-communication.html</a></p>
<p>All my nodes should have a certificate to talk to each other a wildcard certificate would be much simpler, but in kubernetes I dont have a pods domain.</p>
<p>I need way to configure a certificate to all my pods.</p>
<p>For example, if I have a way to call my pods like this:
pod1.example.com
pod2.example.com</p>
<p>I could generate a certificate with *.example.com.</p>
<p>How to achieve that in kubernetes?</p>
<p>Trino is much easier to configure, but I can't use trino yet because Trino doesn't work with metabase.</p>

Rubens Sôto
<p>You can store or save the certificate in secret and use it also. Instead of creating cert at POD level better to manage for each service level.</p>
<p>However, looks like you are looking for something similar to <strong>Mtls</strong> :</p>
<pre><code>In mTLS, each microservice in a service mesh verifies the other's certificate and uses the public keys to create encryption keys unique to each conversation. This enables the communications between pairs of microservices to be authenticated and encrypted.
</code></pre>
<p>You can read more about it : <a href="https://thenewstack.io/mutual-tls-microservices-encryption-for-service-mesh/#:%7E:text=In%20mTLS%2C%20each%20microservice%20in,to%20be%20authenticated%20and%20encrypted" rel="nofollow noreferrer">https://thenewstack.io/mutual-tls-microservices-encryption-for-service-mesh/#:~:text=In%20mTLS%2C%20each%20microservice%20in,to%20be%20authenticated%20and%20encrypted</a>.</p>
<p>Description :</p>
<pre><code>Microservice A sends a request for the certificate of microservice B.
Microservice B replies with its certificate and requests the certificate of Microservice A.
Microservice A checks with the certificate authority that the certificate belongs to Microservice B.
Microservice A sends its certificate to microservice B and also shares a session encryption key (encrypted with the public key of microservice B).
Microservice B checks with the certificate authority that the certificate it received belongs to microservice A.
With both microservices mutually authenticated and a session key created, communication between them can be encrypted and sent via the secure link.
</code></pre>
<p>If are looking for the above scenario managing service communication with certs i would recommend using the service mesh with the <code>Mtls</code>.</p>
