minikube: kubeadm: "failure loading ca certificate: the certificate is not valid yet"
Please provide the following details:
Environment:
Minikube version (use minikube version): 0.26.1
- OS (e.g. from /etc/os-release): Windows 10 (build 16299)
- VM Driver (e.g.
cat ~/.minikube/machines/minikube/config.json | grep DriverName): hyperv - ISO version (e.g.
cat ~/.minikube/machines/minikube/config.json | grep -i ISOorminikube ssh cat /etc/VERSION): file://C:/Users/kiere/.minikube/cache/iso/minikube-v0.26.0.iso - Install tools: ?
- Others: ?
What happened:
C:\Users\kiere> sudo minikube start --vm-driver hyperv --hyperv-virtual-switch "Primary Virtual Switch"
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Downloading kubeadm v1.10.0
Downloading kubelet v1.10.0
Finished Downloading kubeadm v1.10.0
Finished Downloading kubelet v1.10.0
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
E0419 08:54:23.948090 2468 start.go:276] Error starting cluster: kubeadm init error sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests --ignore-preflight-errors=DirAvailable--data
--ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-etcd.yaml --ignore-preflight-errors=Swap --ignore-preflight-errors=CRI running command: : running command: sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests --ignore-preflight-errors=DirAvailable--data --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-etcd.yaml --ignore-preflight-errors=Swap --ignore-preflight-errors=CRI
output: [init] Using Kubernetes version: v1.10.0
[init] Using Authorization modes: [Node RBAC]
[preflight] Running pre-flight checks.
[WARNING Swap]: running with swap on is not supported. Please disable swap
Flag --admission-control has been deprecated, Use --enable-admission-plugins or --disable-admission-plugins instead. Will be removed in a future version.
failure loading ca certificate: the certificate is not valid yet
: running command: sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests --ignore-preflight-errors=DirAvailable--data --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-etcd.yaml --ignore-preflight-errors=Swap --ignore-preflight-errors=CRI
.: Process exited with status 1
What you expected to happen: Minikube VM to start successfully.
How to reproduce it (as minimally and precisely as possible): Follow the exact steps here: https://medium.com/@JockDaRock/minikube-on-windows-10-with-hyper-v-6ef0f4dc158c
Output of minikube logs (if applicable):
F0419 09:01:40.025689 19032 logs.go:50] Error getting cluster bootstrapper: getting kubeadm bootstrapper: getting ssh client: Error creating new ssh host from driver: Error getting ssh host name for driver: Host is not running
Anything else do we need to know: Would be great to understand if the “WARNING Swap” is relevant/related. I’m unsure if it’s referring to the host OS, or VM OS - or how to remedy?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 8
- Comments: 17 (5 by maintainers)
Getting the same issue.
Workaround:
minikube sshand run the init commandkubectl can now connect to minikube. Still have no idea what is actually going on.
Same here. If you delete and recreate the minikube, it’s saying that the apiserver certificate is wrong. I’m using VirtualBox. The vm driver is not the cause.
I can confirm that this issue does not occur in v0.25.2, starts perfectly.
@mbotmcc @aseempatni - see the linked pull request above, it looks like a fix is identified and ready to merge - but isn’t merged yet. I don’t think 0.27 would have anything other than intermittent success
Experiencing the same issue, Linux with kvm2 driver, minikube v0.26.1. I started getting this error when trying to start my previously-working cluster:
After trying to delete and recreate the cluster, I get the same issue as OP. After getting the “the certificate is not yet valid” error, If I try to start the vm again without deleting the vm first I get the same error that I was having before I deleted the cluster.
Same issue on macOS Sierra.