TLS connection error

sometimes when i tried to communicate with the cluster by using kubectl then i got a error that said “Unable to connect to the server: tls: failed to verify certificate: x509: certificate has expired or is not yet valid” , but when i wait for a couple of min. then i works fine.

  1. how to avoid these kind of error and
  2. how does the time is related to tls certification error ()

Ensure your local time is set correctly.

1 Like