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.
Environment
What I did?
I just follow the readme, and copy the
conf/admin.kubeconfig
to~/.kube/config
. When I usekubectl get nodes
, it showsMessages
when installing node3, it also show that the x509 certificate expired.
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 theconf/admin.kubeconfig
? Thanks in advanced.