Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubectl x509 certificate has expired or is not yet valid #1152

Closed
EmJayBee83 opened this issue Aug 15, 2019 · 3 comments
Closed

kubectl x509 certificate has expired or is not yet valid #1152

EmJayBee83 opened this issue Aug 15, 2019 · 3 comments
Labels

Comments

@EmJayBee83
Copy link

EmJayBee83 commented Aug 15, 2019

Starting early this morning I have been unable to successfully connect to new AKS clusters using kubectl. Whenever I try to connect to the cluster (e.g., kubectl get nodes) I receive the following error:

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

Info:
Trying to narrow things donw I spun clusters using the AzureRM provider for terraform, manually in the portal and via the cli (following the steps provided in https://docs.microsoft.com/en-us/azure/aks/kubernetes-walkthrough). All exhibit the same behavior.

Clusters were spun in eastus, centralus, and westus regions.

Credentials for the newly spun cluster were pulled using az aks get-credentials ...

@andyzhangx
Copy link
Contributor

could you try again? it should be recovered now.

@mikkelhegn
Copy link
Contributor

I had an issue caused by WSL2 on Windows, where time the was off, due to WSL2 pausing time when the computer sleep, causing new clusters certs to not be valid yet. Ref: microsoft/WSL#4245 (comment)

@EmJayBee83
Copy link
Author

@mikkelhegn That was it. The system clock on my deployment VM was off. Thanks for taking the time to comment on this.

@ghost ghost locked as resolved and limited conversation to collaborators Jul 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants