<p>I am using Rancher v2.2.2 for managing k8s cluster in Azure AKS. Everything was fine for about one year. All of a sudden my Rancher container started to restart itself every 10 to 15 seconds and Rancher console was unreachable. I found this in container logs:</p>

<pre><code>***Waiting for server to become available: Get https://localhost:6443/version?timeout=30s: x509: certificate has expired or is not yet valid***
</code></pre>

<p>Then I checked localhost certificate inside container and appears that it's just expired. Then I shifted time backward on docker host where is my rancher container and problem disappeared and my rancher was again live. But few weeks after I renewed k8s certificates on Azure and now my Rancher with shifted time
refuses to connect to k8s cluster API server because it has certificate which is not yet valid.</p>

<p>Please can someone help me? Any ideas how to renew certificate inside Rancher container ?</p>

<p>Thanks</p>

asmoljo
<p>I solved the problem by creating a new 'localhost' certificate inside the rancher container. The new certificate is valid for 10 years :)</p>
