<p>I am trying to setup an ASPNET.Core 3.0 web app using Kubernetes but I am unable to get Kestrel work with https. </p>

<p>I found some information searching the web regarding two environment variables I can declare to pass the path and the password for the certificate.</p>

<p>I've made a Kubernetes deployment using those variables like so:</p>

<pre><code>    spec:
      containers:
      - env:
        - name: ASPNETCORE_URLS
          value: http://+:80;https://+:443
        - name: ASPNETCORE_KESTREL_CERTIFICATE_PASSWORD
          value: password
        - name: ASPNETCORE_KESTREL_CERTIFICATE_PATH
          value: /app/tls/certificate.pfx
        volumeMounts:
        - name: storage
          mountPath: "/app/tls"
      volumes:
      - name: storage
        persistentVolumeClaim:
          claimName: tls-storage

</code></pre>

<p>I ran the app without https enabled and saw the volume is mounted correctly inside the pod and <code>certificate.pfx</code> is present in <code>/app/tls/</code>.</p>

<p>Anybody know if Kestrel is configured to get the values from those env variables by default or should I also write some code in <code>Program.cs</code>/<code>Startup.cs</code>?</p>

Mihaimyh
<p>I actually just found the correct environment variables:</p>

<p><code>ASPNETCORE_Kestrel__Certificates__Default__Password</code></p>

<p><code>ASPNETCORE_Kestrel__Certificates__Default__Path</code></p>
