Rancher 2 Kubernetes certificates expired with error x509: certificate has expired or is not yet valid

Viewed 3062

I'm using Rancher version 2.2.8 and when access to Rancher, I got the error x509: certificate has expired or is not yet valid, I found that when the Rancher docker image deployed time exceed 12 months, it will get this error. My process of deploying Rancher is build a docker image which extends from rancher/rancher:v2.2.8 and combine my ssl certificate at /etc/rancher/ssl/, I have many Rancher like this for all services and they all got this error after 1 year. I found this article have the same error to me but I can't find the folder /etc/kubernetes in the docker container (tried to ls -a but this folder doesn't show on the list). I tried to rotate certificate for all cluster on Rancher by clicking Rotate Certificates on Rancher UI before it exceeds 1 year but it doesn't help. Currently I fixed this issue by upgrading Rancher version follow this doc but I want to find another elegant way to deal with this issue.

0 Answers
Related