<p>I'm new to Kubernetes. We have a presto (starburst) cluster deployed in Kubernetes and we are trying to implement SSL certificate for the presto cluster.</p>
<p>Based on the below URL, I have created a keystore (in my local machine) and have to populate this keystore path to 'http-server.https.keystore.path'</p>
<p><a href="https://docs.starburstdata.com/latest/security/internal-communication.html" rel="nofollow noreferrer">https://docs.starburstdata.com/latest/security/internal-communication.html</a></p>
<p>However, this file has to be distributed across the cluster. If I enter the local path then Kubernetes is throwing 'file not found' error. Could you please let me know how to distribute this in presto cluster in kubernetes.</p>
<p>I have tried creating the keystore as secret and mounted this to a volume.</p>
<pre><code>kubectl create secret generic presto-keystore --from-file=./keystore.jks
</code></pre>
<pre><code>kind: Presto
metadata:
  name: stg-presto
spec:
  clusterDomain: cluster.local
  nameOverride: stg-presto
  additionalVolumes:
    - path: /jks
      volume:
      secret:
        secretName: presto-keystore
  additionalJvmConfigProperties: |
  image:
    name: xxxxx/presto
    pullPolicy: IfNotPresent
    tag: 323-e.8-k8s-0.20
  prometheus:
    enabled: true
    additionalRules:
      - pattern: 'presto.execution&lt;name=TaskManager&gt;&lt;&gt;FailedTasks.TotalCount'
        name: 'failed_tasks'
        type: COUNTER
  service:
    type: NodePort
    name: stg-presto
  memory:
    nodeMemoryHeadroom: 30Gi
    xmxToTotalMemoryRatio: 0.9
    heapHeadroomPerNodeRatio: 0.3
    queryMaxMemory: 1Pi
    queryMaxTotalMemoryPerNodePoolFraction: 0.333
  coordinator:
    cpuLimit: &quot;5&quot;
    cpuRequest: &quot;5&quot;
    memoryAllocation: &quot;30Gi&quot;
    image:
      pullPolicy: IfNotPresent
    additionalProperties: |
      http-server.http.enabled=false
      node.internal-address-source=FQDN
      http-server.https.enabled=true
      http-server.https.port=8080
      http-server.https.keystore.path=/jks/keystore.jks
      http-server.https.keystore.key=xxxxxxx
      internal-communication.https.required=true
      internal-communication.https.keystore.path=/jks/keystore.jks
      internal-communication.https.keystore.key=xxxxxxx
</code></pre>
<p>Also tried creating config and mounted it as a volume. But still getting 'Caused by: java.io.FileNotFoundException: /jks/keystore.jks (No such file or directory)'.</p>
<p>Could you please let me know if am missing anything.</p>
<p>Thanks</p>

Subba
<p>You can create a secret in K8s and mount it within Presto deployment using <code>additionalVolumes</code> property.
Checkout documentation on <code>additionalVolumes</code> at <a href="https://docs.starburstdata.com/latest/kubernetes/presto_resource.html" rel="nofollow noreferrer">https://docs.starburstdata.com/latest/kubernetes/presto_resource.html</a></p>
