oc command failed due to certificates expiry after 24 hrs

Posted on

I created UPI OCP cluster on bare metal with three masters, of which one master did not joined the cluster. However, the cluster is running fine with 2 masters. But, after 24 hours duration the certificates are getting expired. when we run oc commands, we get the following error: "Unable to connect to the server: x509: certificate has expired or is not yet valid: current time 2022-06-06T13:19:18+05:30 is after 2022-05-31T09:39:32Z".

kindly provide us with solution for above.
Thanks in Advance.