Closed rams3sh closed 2 years ago
Hey,
I use the minikube on the virtual box
minikube start --kubernetes-version=v1.20.0 --driver=virtualbox
I use this command if it is helpful to you can go with it and let me know that on which platform you using minikube on Docker or Linux or virtual box.
and if it helps to you please let me know.
Hi @rams3sh, thanks for reporting your issue with minikube!
First recommendation, I'd suggest updating to the latest version of minikube (v1.23.2).
Could you please try running minikube delete --all
and then minikube start --driver=docker --force-systemd=true
and let me know if that solves your issue, thanks!
Hi @rams3sh, we haven't heard back from you, do you still have this issue? There isn't enough information in this issue to make it actionable, and a long enough duration has passed, so this issue is likely difficult to replicate.
I will close this issue for now but feel free to reopen when you feel ready to provide more information.
Hi! I'm struggling with the same errors on macOS m1.
minikube works by ignoring this error message, but custom start options like --extra-config=apiserver.service-node-port-range=
won't work.
I think that kubelet couldn't be installed on macos. is it related?
Command to reproduce
minikube start
Main error messages
โ Exiting due to GUEST_START: wait: /bin/bash -c "sudo env PATH="/var/lib/minikube/binaries/v1.22.3:$PATH" kubeadm init --config /var/tmp/minikube/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests,DirAvailable--var-lib-minikube,DirAvailable--var-lib-minikube-etcd,FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml,FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml,FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml,FileAvailable--etc-kubernetes-manifests-etcd.yaml,Port-10250,Swap,Mem,SystemVerification,FileContent--proc-sys-net-bridge-bridge-nf-call-iptables": Process exited with status 1
stdout:
[init] Using Kubernetes version: v1.22.3
[preflight] Running pre-flight checks
stderr:
[WARNING Swap]: running with swap on is not supported. Please disable swap
[WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service'
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR KubeletVersion]: couldn't get kubelet version: cannot execute 'kubelet --version': exit status 255
[preflight] If you know what you are doing, you can make a check non-fatal with --ignore-preflight-errors=...
I was wrong. minikube doesn't start. I was confused with docker desktop k8s.
I have this issue on m1 mac.
I am also having the same issue. My host system is :
Model Name: MacBook Pro Chip: Apple M1 Max
And this is the complete output minikube start --driver=docker --force-systemd=true ๐ minikube v1.24.0 on Darwin 12.0.1 (arm64) โจ Using the docker driver based on user configuration ๐ Starting control plane node minikube in cluster minikube ๐ Pulling base image ... ๐ฅ Creating docker container (CPUs=2, Memory=1988MB) ... ๐ณ Preparing Kubernetes v1.22.3 on Docker 20.10.8 ... ๐ข initialization failed, will try again: wait: /bin/bash -c "sudo env PATH="/var/lib/minikube/binaries/v1.22.3:$PATH" kubeadm init --config /var/tmp/minikube/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests,DirAvailable--var-lib-minikube,DirAvailable--var-lib-minikube-etcd,FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml,FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml,FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml,FileAvailable--etc-kubernetes-manifests-etcd.yaml,Port-10250,Swap,Mem,SystemVerification,FileContent--proc-sys-net-bridge-bridge-nf-call-iptables": Process exited with status 1 stdout: [init] Using Kubernetes version: v1.22.3 [preflight] Running pre-flight checks
stderr:
[WARNING Swap]: running with swap on is not supported. Please disable swap
[WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service'
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR KubeletVersion]: couldn't get kubelet version: cannot execute 'kubelet --version': exit status 255
[preflight] If you know what you are doing, you can make a check non-fatal with --ignore-preflight-errors=...
To see the stack trace of this error execute with --v=5 or higher
๐ฃ Error starting cluster: wait: /bin/bash -c "sudo env PATH="/var/lib/minikube/binaries/v1.22.3:$PATH" kubeadm init --config /var/tmp/minikube/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests,DirAvailable--var-lib-minikube,DirAvailable--var-lib-minikube-etcd,FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml,FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml,FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml,FileAvailable--etc-kubernetes-manifests-etcd.yaml,Port-10250,Swap,Mem,SystemVerification,FileContent--proc-sys-net-bridge-bridge-nf-call-iptables": Process exited with status 1 stdout: [init] Using Kubernetes version: v1.22.3 [preflight] Running pre-flight checks
stderr:
[WARNING Swap]: running with swap on is not supported. Please disable swap
[WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service'
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR KubeletVersion]: couldn't get kubelet version: cannot execute 'kubelet --version': exit status 255
[preflight] If you know what you are doing, you can make a check non-fatal with --ignore-preflight-errors=...
To see the stack trace of this error execute with --v=5 or higher
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ ๐ฟ If the above advice does not help, please let us know: โ
โ ๐ https://github.com/kubernetes/minikube/issues/new/choose โ
โ โ
โ Please run minikube logs --file=logs.txt
and attach logs.txt to the GitHub issue. โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โ Exiting due to GUEST_START: wait: /bin/bash -c "sudo env PATH="/var/lib/minikube/binaries/v1.22.3:$PATH" kubeadm init --config /var/tmp/minikube/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests,DirAvailable--var-lib-minikube,DirAvailable--var-lib-minikube-etcd,FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml,FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml,FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml,FileAvailable--etc-kubernetes-manifests-etcd.yaml,Port-10250,Swap,Mem,SystemVerification,FileContent--proc-sys-net-bridge-bridge-nf-call-iptables": Process exited with status 1 stdout: [init] Using Kubernetes version: v1.22.3 [preflight] Running pre-flight checks
stderr:
[WARNING Swap]: running with swap on is not supported. Please disable swap
[WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service'
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR KubeletVersion]: couldn't get kubelet version: cannot execute 'kubelet --version': exit status 255
[preflight] If you know what you are doing, you can make a check non-fatal with --ignore-preflight-errors=...
To see the stack trace of this error execute with --v=5 or higher
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ ๐ฟ If the above advice does not help, please let us know: โ
โ ๐ https://github.com/kubernetes/minikube/issues/new/choose โ
โ โ
โ Please run minikube logs --file=logs.txt
and attach logs.txt to the GitHub issue. โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
I have the same issue for M1 Max Chip. Exactly as @vimalkansal. Here's my output. (base) runtiansong@runtians-MBP istio-1.12.1 % minikube start ๐ minikube v1.24.0 on Darwin 12.0.1 (arm64) โจ Using the docker driver based on existing profile ๐ Starting control plane node minikube in cluster minikube ๐ Pulling base image ... ๐ Restarting existing docker container for "minikube" ... ๐ณ Preparing Kubernetes v1.22.3 on Docker 20.10.8 ... ๐ข initialization failed, will try again: wait: /bin/bash -c "sudo env PATH="/var/lib/minikube/binaries/v1.22.3:$PATH" kubeadm init --config /var/tmp/minikube/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests,DirAvailable--var-lib-minikube,DirAvailable--var-lib-minikube-etcd,FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml,FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml,FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml,FileAvailable--etc-kubernetes-manifests-etcd.yaml,Port-10250,Swap,Mem,SystemVerification,FileContent--proc-sys-net-bridge-bridge-nf-call-iptables": Process exited with status 1 stdout: [init] Using Kubernetes version: v1.22.3 [preflight] Running pre-flight checks
stderr:
[WARNING Swap]: running with swap on is not supported. Please disable swap
[WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service'
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR KubeletVersion]: couldn't get kubelet version: cannot execute 'kubelet --version': exit status 255
[preflight] If you know what you are doing, you can make a check non-fatal with --ignore-preflight-errors=...
To see the stack trace of this error execute with --v=5 or higher
๐ฃ Error starting cluster: wait: /bin/bash -c "sudo env PATH="/var/lib/minikube/binaries/v1.22.3:$PATH" kubeadm init --config /var/tmp/minikube/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests,DirAvailable--var-lib-minikube,DirAvailable--var-lib-minikube-etcd,FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml,FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml,FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml,FileAvailable--etc-kubernetes-manifests-etcd.yaml,Port-10250,Swap,Mem,SystemVerification,FileContent--proc-sys-net-bridge-bridge-nf-call-iptables": Process exited with status 1 stdout: [init] Using Kubernetes version: v1.22.3 [preflight] Running pre-flight checks
stderr:
[WARNING Swap]: running with swap on is not supported. Please disable swap
[WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service'
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR KubeletVersion]: couldn't get kubelet version: cannot execute 'kubelet --version': exit status 255
[preflight] If you know what you are doing, you can make a check non-fatal with --ignore-preflight-errors=...
To see the stack trace of this error execute with --v=5 or higher
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ ๐ฟ If the above advice does not help, please let us know: โ
โ ๐ https://github.com/kubernetes/minikube/issues/new/choose โ
โ โ
โ Please run minikube logs --file=logs.txt
and attach logs.txt to the GitHub issue. โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โ Exiting due to GUEST_START: wait: /bin/bash -c "sudo env PATH="/var/lib/minikube/binaries/v1.22.3:$PATH" kubeadm init --config /var/tmp/minikube/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests,DirAvailable--var-lib-minikube,DirAvailable--var-lib-minikube-etcd,FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml,FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml,FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml,FileAvailable--etc-kubernetes-manifests-etcd.yaml,Port-10250,Swap,Mem,SystemVerification,FileContent--proc-sys-net-bridge-bridge-nf-call-iptables": Process exited with status 1 stdout: [init] Using Kubernetes version: v1.22.3 [preflight] Running pre-flight checks
stderr:
[WARNING Swap]: running with swap on is not supported. Please disable swap
[WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service'
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR KubeletVersion]: couldn't get kubelet version: cannot execute 'kubelet --version': exit status 255
[preflight] If you know what you are doing, you can make a check non-fatal with --ignore-preflight-errors=...
To see the stack trace of this error execute with --v=5 or higher
Thanks to @rsong0606 we found that we're downloading an amd64 version of kubelet, an arm64 binary would instead be looking for /lib/ld-linux-aarch64.so.1
@sharifelgamal : the best fix would be to add the arch after the os in the cache.
Same way that we fixed kubectl
, when it was using the Linux binary on a Mac...
To anyone coming across this problem:
minikube delete --all --purge
It is working now. Thanks @spowelljr (base) @runtians-MBP istio-1.12.1 % minikube delete --all --purge ๐ฅ Deleting "minikube" in docker ... ๐ฅ Removing /Users/runtiansong/.minikube/machines/minikube ... ๐ Removed all traces of the "minikube" cluster. ๐ฅ Successfully deleted all profiles ๐ Successfully purged minikube directory located at - [/Users/runtiansong/.minikube] (base) runtiansong@runtians-MBP istio-1.12.1 % minikube start ๐ minikube v1.24.0 on Darwin 12.0.1 (arm64) โจ Automatically selected the docker driver ๐ Starting control plane node minikube in cluster minikube ๐ Pulling base image ...
gcr.io/k8s-minikube/kicbase: 321.58 MiB / 321.58 MiB 100.00% 16.50 MiB p ๐ฅ Creating docker container (CPUs=2, Memory=8100MB) ... kubectl.sha256: 64 B / 64 B [--------------------------] 100.00% ? p/s 0s kubeadm.sha256: 64 B / 64 B [--------------------------] 100.00% ? p/s 0s kubelet.sha256: 64 B / 64 B [--------------------------] 100.00% ? p/s 0s kubectl: 41.44 MiB / 41.44 MiB [-------------] 100.00% 22.58 MiB p/s 2.0s kubelet: 107.26 MiB / 107.26 MiB [-----------] 100.00% 23.33 MiB p/s 4.8s kubeadm: 40.50 MiB / 40.50 MiB [--------------] 100.00% 5.91 MiB p/s 7.1s
โช Generating certificates and keys ...
โช Booting up control plane ...
โช Configuring RBAC rules ...
๐ Verifying Kubernetes components... โช Using image gcr.io/k8s-minikube/storage-provisioner:v5 ๐ Enabled addons: storage-provisioner, default-storageclass ๐ Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default (base) @runtians-MBP istio-1.12.1 %
@spowelljr It works! Thanks ๐
we could adde arch to file name in cache
Hi @rams3sh, thanks for reporting your issue with minikube!
First recommendation, I'd suggest updating to the latest version of minikube (v1.23.2).
Could you please try running
minikube delete --all
and thenminikube start --driver=docker --force-systemd=true
and let me know if that solves your issue, thanks!
It works. Thanks.
To anyone coming across this problem:
1. Make sure you're using the arm64 binary of minikube 2. Run `minikube delete --all --purge` 3. Try starting minikube again
Thank you. I had this issue on Linux too and this solved it
Hi @rams3sh, thanks for reporting your issue with minikube!
First recommendation, I'd suggest updating to the latest version of minikube (v1.23.2).
Could you please try running
minikube delete --all
and thenminikube start --driver=docker --force-systemd=true
and let me know if that solves your issue, thanks!
This solution worked for me.
I also had to delete my minikube docker container and the docker image (these were for the old amd64 version of minikube that I was using before switching to arm64)
I'm on minikube v1.33.1, and still facing this error
I have tried minikube delete --all --purge
, and it didn't work
and made sure that my minikube
executable is arm64
Should I just give up on using minikube with docker driver?
Hi @yousefhamza and anyone else that runs into this issue, this is resolved for future releases by https://github.com/kubernetes/minikube/pull/19205.
The problem is you have an amd64 version of the kicbase in your Docker daemon. minikube uses this image to start the cluster, but downloads and uses arm64 binaries, causing an architecture mismatch, causing kubelet --version
to fail. You can confirm this by running:
$ docker image inspect gcr.io/k8s-minikube/kicbase:v0.0.44 | grep Architecture
If you run minikube delete --all --purge
to clear the minikube cache, and then delete any kicbase image from the Docker daemon (docker rmi gcr.io/k8s-minikube/kicbase:v0.0.44
) your issue should be resolved.
Thanks @spowelljr for the prompt response ๐
I have tried this fix already, and now removed all images from my machine, and the command you provided returns
"Architecture": "arm64",
which is the correct architecture.
However minikube start
still fails due to kubelet --version
error.
Upon closer inspection into Docker, I found that after running minikube start
, I end up with 2 docker images, there was none before running the command, and the wrong image is used. do you know why is this happening?
Are you using an amd64 version of the minikube binary @yousefhamza? Or is something on your machine configuring Docker to pull amd64 images? I am confused why an amd64 image is getting pulled...
Could you run minikube delete --all --purge
and remove the image from Docker again. Then download: https://storage.googleapis.com/minikube-builds/19205/minikube-darwin-arm64 and use that to start minikube, that should resolve your issue, but I'm still not sure why an amd64 image is getting downloaded.
If you run the following what's the output?
$ docker pull alpine:latest
$ docker image inspect alpine:latest | grep Architecture
My minikube
is arm64
yosefhamza@Yousefs-Macbook-Pro-14 ~ % file /opt/homebrew/bin/minikube
/opt/homebrew/bin/minikube: Mach-O 64-bit executable arm64
$ docker pull alpine:latest
$ docker image inspect alpine:latest | grep Architecture
running this returns "Architecture": "amd64",
I delete all images in docker, confirmed that docker is arm64, re-installed minikube, and I still have the same issue
Below are some of the logs when I run minikube start
Thanks for the update and the information!
running this returns "Architecture": "amd64",
There's something wrong here, this is indicating that your Docker is pulling amd64 images by default and is essentially the root of the problem. If I run it on my M1 Mac I get:
"Architecture": "arm64",
I'm not sure if there's an option or config value you modified in Docker somewhere to cause that, but for other use cases outside of minikube you'd likely want to find the cause and resolve it.
But back to the minikube front, this makes sense why it's happening given the above information. When you start minikube for the first time or after minikube delete --all --purge
it downloads the kicbase image to the minikube home folder cache (~/.minikube/cache
), it them loads the image from the cache into the Docker daemon. This operation is correctly downloading the arm64 version of the kicbase. The problem is that images loaded from a local file lose their sha, so to ensure that the image was unmodified we run docker pull <kicbase_image>
with the point to just get the sha attached to the image to made sure unmodified. This docker pull
command should have had a --plaform=linux/<arch>
flag included in it (resolved in https://github.com/kubernetes/minikube/pull/19205), but since it's missing that, it leaves it up to your Docker to pull the arch it wants, which in your case is defaulted to amd64, it basically looks at the arm64 kicbase image and goes "this isn't the image that I want" and then proceeds to downloads the amd64 version of the kicbase, which is causing your issue. Since sha has priority over tags, when minikube starts it uses the amd64 kicbase and you get the issues you see.
So like I mentioned above, if you're able to figure out why your Docker is pulling amd64 images by default and resolve that, it should also resolve this issue you're experiencing in minikube. Otherwise, you can download and use the binary I'll link below that has the --platform
fix implemeneted until the next minikube release that will have the fix included.
https://storage.googleapis.com/minikube-builds/19205/minikube-darwin-arm64
@yousefhamza, I faced the same issue as well where the kicbase image was arm64, but docker pull alpine
would always download amd64
by default. Check your
echo DOCKER_DEFAULT_PLATFORM
, for me I had set it to linux/amd64 sometime back. Changing it back to linux/arm64 fixed the issue. Now docker pull
pulls arm64 images. I'd highly recommend checking your docker default platform
echo $DOCKER_DEFAULT_PLATFORM
linux/arm64
Thanks @spowelljr for explaining the issue ๐
Thanks @revathyrams for the docker reference ๐ , I found that it was linux/amd64
and when I fixed it, minikube finished successfully
Steps to reproduce the issue:
minikube start --driver=docker
Full output of failed command:
Let me know if any other details are required from my end.