How do I update custom TLS certificates for the Admin Console in Embedded Cluster installations?
In Embedded Cluster installations, you can provide custom TLS certificates during installation and update them later through the Admin Console. To upload a replacement certificate, you must temporarily enable anonymous TLS uploads on the cluster using kubectl.
Caution
Adding theacceptAnonymousUploadsannotation temporarily allows unauthorized TLS certificate uploads to the Admin Console. Once the new certificate is uploaded, this exposure is closed again. Complete the upload process quickly to minimize the security risk.
Procedure Copied
-
SSH to a controller node where Embedded Cluster is installed. Run the following command to open a shell with
kubectlaccess:sudo ./itrs-analytics shellExample:
[dev@host iax]$ sudo ./itrs-analytics shell __4___ _ \ \ \ \ Welcome to itrs-analytics debug shell. <'\ /_/_/_/ This terminal is now configured to access your cluster. ((____!___/) Type 'exit' (or Ctrl+D) to exit. \0\0\0\0\/ ~~~~~~~~~~~ [dev@host iax]# export KUBECONFIG="/var/lib/embedded-cluster/k0s/pki/admin.conf" [dev@host iax]# export PATH="$PATH:/var/lib/embedded-cluster/bin" [dev@host iax]# -
In the shell, add the
acceptAnonymousUploadsannotation to re-enable TLS certificate uploads:kubectl -n kotsadm annotate secret kotsadm-tls acceptAnonymousUploads=1 --overwrite -
Get the name of the
kurl-proxypod:kubectl get pods -A | grep kurl-proxy | awk '{print $2}'Example:
[dev@host iax]# kubectl get pods -A | grep kurl-proxy | awk '{print $2}' kurl-proxy-kotsadm-6bfbbbb5c5-8n2mw -
Delete the
kurl-proxypod so it restarts and picks up the annotation. Kubernetes recreates the pod automatically.kubectl delete pod PROXY_SERVER -n kotsadmReplace
PROXY_SERVERwith the pod name from the previous step.Example:
[dev@host iax]# kubectl delete pod kurl-proxy-kotsadm-6bfbbbb5c5-8n2mw -n kotsadm pod "kurl-proxy-kotsadm-6bfbbbb5c5-8n2mw" deleted -
After the pod restarts, open
http://<ip>:30000/tlsin your browser. Replace<ip>with the IP address of your controller node, then complete the certificate upload in the Admin Console.