Minikube: Auto-refresh kubeadm certs after they expire "certificate has expired or is not yet valid"

Created on 8 Aug 2020  ยท  5Comments  ยท  Source: kubernetes/minikube


Steps to reproduce the issue:

  1. Installed docker for desktop on my MacBook
  2. Executed 'minikube start'
  3. got the error. Please see the below log details.
    ๐Ÿ˜„ minikube v1.12.2 on Darwin 10.15.5
    โœจ Automatically selected the docker driver
    โ— Requested memory allocation (1991MB) is less than the recommended minimum 2000MB. Kubernetes may crash unexpectedly.
    โ— Your system has 8192MB memory but Docker has only 1991MB. For a better performance increase to at least 3GB.

    Docker for Desktop > Settings > Resources > Memory

๐Ÿ‘ Starting control plane node minikube in cluster minikube
๐Ÿ”ฅ Creating docker container (CPUs=2, Memory=1991MB) ...
๐Ÿณ Preparing Kubernetes v1.18.3 on Docker 19.03.8 ...
๐Ÿ”Ž Verifying Kubernetes components...
โ— Enabling 'default-storageclass' returned an error: running callbacks: [Error making standard the default storage class: Error listing StorageClasses: Unauthorized]
๐ŸŒŸ Enabled addons: default-storageclass, storage-provisioner

๐Ÿ’ฃ failed to start node: startup failed: wait 6m0s for node: wait for healthy API server: controlPlane never updated to v1.18.3

๐Ÿ˜ฟ minikube is exiting due to an error. If the above message is not useful, open an issue:
๐Ÿ‘‰ https://github.com/kubernetes/minikube/issues/new/choose

Full output of minikube start command used, if not already included:

๐Ÿ˜„ minikube v1.12.2 on Darwin 10.15.5
โœจ Automatically selected the docker driver
โ— Requested memory allocation (1991MB) is less than the recommended minimum 2000MB. Kubernetes may crash unexpectedly.
โ— Your system has 8192MB memory but Docker has only 1991MB. For a better performance increase to at least 3GB.

Docker for Desktop  > Settings > Resources > Memory

๐Ÿ‘ Starting control plane node minikube in cluster minikube
๐Ÿ”ฅ Creating docker container (CPUs=2, Memory=1991MB) ...
๐Ÿณ Preparing Kubernetes v1.18.3 on Docker 19.03.8 ...
๐Ÿ”Ž Verifying Kubernetes components...
โ— Enabling 'default-storageclass' returned an error: running callbacks: [Error making standard the default storage class: Error listing StorageClasses: Unauthorized]
๐ŸŒŸ Enabled addons: default-storageclass, storage-provisioner

๐Ÿ’ฃ failed to start node: startup failed: wait 6m0s for node: wait for healthy API server: controlPlane never updated to v1.18.3

๐Ÿ˜ฟ minikube is exiting due to an error. If the above message is not useful, open an issue:
๐Ÿ‘‰ https://github.com/kubernetes/minikube/issues/new/choose

Optional: Full output of minikube logs command:

==> kernel <==
20:05:15 up 21 min, 0 users, load average: 0.18, 0.24, 0.25
Linux minikube 4.19.76-linuxkit #1 SMP Tue May 26 11:42:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
PRETTY_NAME="Ubuntu 20.04 LTS"

==> kube-apiserver [254ba48dcc19] <==
E0808 19:56:35.440774 1 authentication.go:53] Unable to authenticate the request due to an error: x509: certificate has expired or is not yet valid
E0808 19:56:35.940585 1 authentication.go:53] Unable to authenticate the request due to an error: x509: certificate has expired or is not yet valid
E0808 19:56:36.440291 1 authentication.go:53] Unable to authenticate the request due to an error: x509: cer

help wanted kinbug prioritimportant-longterm

Most helpful comment

I had the same problem and it was solved by doing a minikube delete and then minikube start

All 5 comments

I had the same problem and it was solved by doing a minikube delete and then minikube start

Hey @apsraj01 did that work for you?

I'd also suggest increasing the memory available to Docker:

โ— Your system has 8192MB memory but Docker has only 1991MB. For a better performance increase to at least 3GB.

Docker for Desktop  > Settings > Resources > Memory

This is defiantely a bug ! and we need to fix this !
it appears that the kubeadm certificates are expired, I would accept any PR that fixes this problem

@RA489 mentioned that we could do kubeadm renew cert phase.

kubeadm alpha certs check-expiration [flags]Checks expiration for the certificates in the local PKI managed by kubeadm and we can probably include it in minikube status then we can run kubeadm alpha certs renew [flags] automatically for user.

@RA489 that's a good idea, if anyone would be interested in contributing this, feel free to take this issue on.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

StasPerekrestov picture StasPerekrestov  ยท  3Comments

jroucheton picture jroucheton  ยท  3Comments

mrtkp9993 picture mrtkp9993  ยท  3Comments

RaeesBhatti picture RaeesBhatti  ยท  3Comments

olalonde picture olalonde  ยท  3Comments