Verify that the K3s certificates are expired by running any k3s kubectl CLI command. The following outcome shows that the K3s certificates are expired:
$ k3s kubectl get pods -n efa Unable to connect to the server: x509: certificate has expired or is not yet valid: current time 2023-09-25T14:01:08+05:30 is after 2023-05-19T15:35:05Z
This procedure describes how to recover the expired K3s certificates.
$ sudo systemctl restart k3s
Note
In an HA deployment, restart the service only on the active node. Do not start the service on the statndby node.$ k3s kubectl get pods -n efa
$ curl -v -k https://<vip>:6443
Note
$ sudo su For TPVM, change directory to /apps/efa/ and for server /opt/efa/ $ cd /apps/efa $ export EFA_LOG_TO_STDOUT=1 $ source common.sh; initialize_deployment_global_env $ copy_k3s_certs_to_peer
~# for i in `ls /apps/rancher/k3s/server/tls/*.crt`; do echo $i; openssl x509 -enddate -noout -in $i; done