Rancher 2.xdocker install single node

Hi there, I have a Rancher single node install on top of an Ubuntu VM (18.04) thats currently managing clusters and i’m wanting to add my own privately signed ssl certificates.

I’ve tried following the instructions here as well as creating a backup of the existing container to avoid data loss - Single Node Install.

i’m trying to do this as follows:

docker run -d --volumes-from rancher-data-20-4-21
–restart=unless-stopped
-p 80:80 -p 443:443
-v /home/k8s/Projects/rancher/rancher.pem:/etc/rancher/ssl/cert.pem
-v /home/k8s/Projects/rancher/rancher.key:/etc/rancher/ssl/key.pem
-v /home/k8s/Projects/rancher/cacerts.pem:/etc/rancher/ssl/cacerts.pem
–privileged
rancher/rancher:latest

However, when I spin up the rancher container again I encounter lots of TLS handshake errors with the managed clusters which in turn I lose access to. I’m suspecting its an issue with the cattle agents but i’m not sure how I implement a fix for that.

I’m aware this isn’t the recommended way to deploy and manage clusters but is there anyone who can assist with this? Thank you.

Update, i’ve noticed within the settings my Rancher container is using the default cacerts it was spun up with. I’ve tried to update this using the following to no avail (with /home/k8s/Projects/rancher/certs containing the private ca cert bundle):

docker run -d
–restart=unless-stopped
-p 80:80 -p 443:443
-v /home/k8s/Projects/rancher/certs:/container/certs
-e SSL_CERT_DIR="/container/certs"
–privileged
rancher/rancher:latest

Still experiencing issues… can anyone please advise?

If you are changing certificates, you have to follow Rancher Docs: Updating a Private CA Certificate or other solutions in https://github.com/rancher/rancher/issues/14731