|
| 1 | +# Updating Custom TLS Certificates in Embedded Cluster Installations |
| 2 | + |
| 3 | +This topic describes how to update custom TLS certificates in Replicated Embedded Cluster installations. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +For Embedded Cluster installations, the default Replicated KOTS self-signed certificate automatically renews 30 days before the expiration date. |
| 8 | + |
| 9 | +If a custom TLS certificate is used instead, then no renewal is attempted, even if the certificate is expired. In this case, users can manually upload a new custom certificate from the KOTS Admin Console when the certificate expires. |
| 10 | + |
| 11 | +## Update Custom TLS Certificates |
| 12 | + |
| 13 | +:::important |
| 14 | +Adding the `acceptAnonymousUploads` annotation temporarily creates a vulnerability for an attacker to maliciously upload TLS certificates. After TLS certificates have been uploaded, the vulnerability is closed again. |
| 15 | + |
| 16 | +Replicated recommends that you complete this upload process quickly to minimize the vulnerability risk. |
| 17 | +::: |
| 18 | + |
| 19 | +To upload a new custom TLS certificate in Embedded Cluster installations: |
| 20 | + |
| 21 | +1. SSH onto a controller node where Embedded Cluster is installed. Then, run the following command to start a shell so that you can access the cluster with kubectl: |
| 22 | + |
| 23 | + ```bash |
| 24 | + sudo ./APP_SLUG shell |
| 25 | + ``` |
| 26 | + Where `APP_SLUG` is the unique slug of the installed application. |
| 27 | + |
| 28 | +1. In the shell, run the following command to restore the ability to upload new TLS certificates by adding the `acceptAnonymousUploads` annotation: |
| 29 | + |
| 30 | + ```bash |
| 31 | + kubectl -n default annotate secret kotsadm-tls acceptAnonymousUploads=1 --overwrite |
| 32 | + ``` |
| 33 | + |
| 34 | +1. Run the following command to get the name of the kurl-proxy server: |
| 35 | + |
| 36 | + ```bash |
| 37 | + kubectl get pods -A | grep kurl-proxy | awk '{print $2}' |
| 38 | + ``` |
| 39 | + :::note |
| 40 | + This server is named `kurl-proxy`, but is used in both Embedded Cluster and kURL installations. |
| 41 | + ::: |
| 42 | + |
| 43 | +1. Run the following command to delete the kurl-proxy pod. The pod automatically restarts after the command runs. |
| 44 | + |
| 45 | + ```bash |
| 46 | + kubectl delete pods PROXY_SERVER |
| 47 | + ``` |
| 48 | + |
| 49 | + Replace `PROXY_SERVER` with the name of the kurl-proxy server that you got in the previous step. |
| 50 | + |
| 51 | +1. After the pod has restarted, go to `http://<ip>:30000/tls` in your browser and complete the process in the Admin Console to upload a new certificate. |
0 commit comments