Skip to content

Instantly share code, notes, and snippets.

@prongbang
Created June 30, 2024 03:59
Show Gist options
  • Save prongbang/1e18a8f7cac8c950bb723f479012864e to your computer and use it in GitHub Desktop.
Save prongbang/1e18a8f7cac8c950bb723f479012864e to your computer and use it in GitHub Desktop.

Fix: Unable to connect to the server: x509: certificate has expired or is not yet valid:

Certificate expired

sudo microk8s.refresh-certs -c
The CA certificate will expire in 3649 days.
The server certificate will expire in 364 days.
The front proxy client certificate will expire in 364 days.

Renew

sudo microk8s refresh-certs --cert ca.crt
sudo microk8s refresh-certs --cert front-proxy-client.crt
sudo microk8s refresh-certs --cert server.crt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment