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

the certificate has expired #112

Open
TravisRoad opened this issue Jan 9, 2023 · 7 comments
Open

the certificate has expired #112

TravisRoad opened this issue Jan 9, 2023 · 7 comments

Comments

@TravisRoad
Copy link

Environment

  • OS: Arch Linux x86_64 6.1.4-arch1-1
  • Kubernetes version: v1.16.14
  • VirtualBox version: v7.0.4
  • Vagrant version: 2.3.4

What I did?

I just follow the readme, and copy the conf/admin.kubeconfig to ~/.kube/config. When I use kubectl get nodes, it shows

Unable to connect to the server: x509: certificate has expired or is not yet valid: 
current time 2023-01-09T22:08:46+08:00 is after 2023-01-09T09:34:00Z

Messages

when installing node3, it also show that the x509 certificate expired.

node3: deploy coredns
node3: unable to recognize "STDIN": Get https://172.17.8.101:6443/api?timeout=32s: x509: certificate has expired or is not yet valid
node3: unable to recognize "STDIN": Get https://172.17.8.101:6443/api?timeout=32s: x509: certificate has expired or is not yet valid
node3: unable to recognize "STDIN": Get https://172.17.8.101:6443/api?timeout=32s: x509: certificate has expired or is not yet valid
node3: unable to recognize "STDIN": Get https://172.17.8.101:6443/api?timeout=32s: x509: certificate has expired or is not yet valid
node3: unable to recognize "STDIN": Get https://172.17.8.101:6443/api?timeout=32s: x509: certificate has expired or is not yet valid
node3: unable to recognize "STDIN": Get https://172.17.8.101:6443/api?timeout=32s: x509: certificate has expired or is not yet valid
node3: /home/vagrant
node3: deploy kubernetes dashboard
node3: unable to recognize "/vagrant/addon/dashboard/kubernetes-dashboard.yaml": Get https://172.17.8.101:6443/api?timeout=32s: x509: certificate has expired or is not yet valid
node3: unable to recognize "/vagrant/addon/dashboard/kubernetes-dashboard.yaml": Get https://172.17.8.101:6443/api?timeout=32s: x509: certificate has expired or is not yet valid
node3: unable to recognize "/vagrant/addon/dashboard/kubernetes-dashboard.yaml": Get https://172.17.8.101:6443/api?timeout=32s: x509: certificate has expired or is not yet valid
node3: unable to recognize "/vagrant/addon/dashboard/kubernetes-dashboard.yaml": Get https://172.17.8.101:6443/api?timeout=32s: x509: certificate has expired or is not yet valid
node3: unable to recognize "/vagrant/addon/dashboard/kubernetes-dashboard.yaml": Get https://172.17.8.101:6443/api?timeout=32s: x509: certificate has expired or is not yet valid
node3: unable to recognize "/vagrant/addon/dashboard/kubernetes-dashboard.yaml": Get https://172.17.8.101:6443/api?timeout=32s: x509: certificate has expired or is not yet valid
node3: create admin role token
node3: unable to recognize "/vagrant/yaml/admin-role.yaml": Get https://172.17.8.101:6443/api?timeout=32s: x509: certificate has expired or is not yet valid
node3: unable to recognize "/vagrant/yaml/admin-role.yaml": Get https://172.17.8.101:6443/api?timeout=32s: x509: certificate has expired or is not yet valid
node3: the admin role token is:
node3: Unable to connect to the server: x509: certificate has expired or is not yet valid
node3: Unable to connect to the server: x509: certificate has expired or is not yet valid
node3: login to dashboard with the above token
node3: Unable to connect to the server: x509: certificate has expired or is not yet valid
node3: https://172.17.8.101:
node3: install traefik ingress controller
node3: unable to recognize "/vagrant/addon/traefik-ingress/ingress.yaml": Get https://172.17.8.101:6443/api?timeout=32s: x509: certificate has expired or is not yet valid
node3: unable to recognize "/vagrant/addon/traefik-ingress/traefik-rbac.yaml": Get https://172.17.8.101:6443/api?timeout=32s: x509: certificate has expired or is not yet valid
node3: unable to recognize "/vagrant/addon/traefik-ingress/traefik.yaml": Get https://172.17.8.101:6443/api?timeout=32s: x509: certificate has expired or is not yet valid
node3: unable to recognize "/vagrant/addon/traefik-ingress/traefik.yaml": Get https://172.17.8.101:6443/api?timeout=32s: x509: certificate has expired or is not yet valid
node3: unable to recognize "/vagrant/addon/traefik-ingress/traefik.yaml": Get https://172.17.8.101:6443/api?timeout=32s: x509: certificate has expired or is not yet valid
node3: Configure Kubectl to autocomplete
# kubectl get nodes
Unable to connect to the server: x509: certificate has expired or is not yet valid: 
current time 2023-01-09T22:08:46+08:00 is after 2023-01-09T09:34:00Z

I'm a newbie learning the k8s. I find this on stackoverflow, but I cannot find /etc/kubernetes/pki/apiserver.crt. Maybe I should modify the change the conf/admin.kubeconfig? Thanks in advanced.

@eason-su
Copy link

eason-su commented Jan 9, 2023 via email

@lucienhsu
Copy link

遇到同样的问题,求助

@eason-su
Copy link

eason-su commented Feb 18, 2023 via email

@Ryan-dev-design
Copy link

same problem on Ubuntu 22.04

@eason-su
Copy link

eason-su commented Apr 7, 2023 via email

@luis-herrera-aburto
Copy link

The same! Someone has the solution?

@eason-su
Copy link

eason-su commented May 5, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants