-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Improvements for using x86 binary on arm64 machine #19205
Conversation
8c945b3
to
0c22171
Compare
/ok-to-test |
This comment has been minimized.
This comment has been minimized.
These are the flake rates of all failed tests.
To see the flake rates of all tests by environment, click here. |
/ok-to-test |
This comment has been minimized.
This comment has been minimized.
e135cff
to
fa26408
Compare
This comment has been minimized.
This comment has been minimized.
kvm2 driver with docker runtime
Times for minikube start: 50.5s 49.4s 52.2s 49.9s 50.0s Times for minikube ingress: 25.4s 24.0s 25.0s 27.5s 25.0s docker driver with docker runtime
Times for minikube start: 25.5s 21.3s 24.3s 22.4s 24.1s Times for minikube ingress: 21.3s 21.8s 22.8s 21.8s 22.3s docker driver with containerd runtime
Times for minikube (PR 19205) ingress: 48.3s 31.8s 47.8s 31.8s 31.8s Times for minikube start: 23.5s 19.9s 22.8s 20.7s 23.3s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one nit and then it will be good to go.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: medyagh, spowelljr The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Related #19110 #18895 #12274
Improvement 1
Issue:
If a user desired to run an x86 cluster on an arm64 machine, they would use an x86 minikube binary. However, due to our logic we would use an x86 ISO, but we would then download arm64 preload and K8s binaries, resulting in arch mismatches between the cluster and the K8s binaries, resulting in minikube failing to start.
Fix:
We now download the preloads and K8s binary strictly based on the minikube binary arch, resulting in the proper K8s binaries being downloaded.
Improvement 2
Issue:
When starting minikube using an x86 binary on an arm64 machine and using the Docker driver, we would incorrectly download both the x86 and arm64 kicbase images, and use the arm64 image for running the container. This was due to running a
docker pull
without the--platform
flag, using the host machines default arch, being arm64.Fix:
We now specify the
--platform
flag on thedocker pull
, resulting in correctly only pulling the x86 kicbase image.Improvement 3
Issue:
After resolving the above two issues I was able to attempt to to start an x86 kicbase with x86 K8s binaries on an arm64 machine, this resulted in the failure
could not detect clock speed from output
fromkubelet
. And as per kubernetes-sigs/kind#3621 (comment),Docker's "cross platform images" only use partial emulation that cannot run a workload like Kubernetes.
Fix:
Hard fail if a user attempts to start an x86 cluster on arm64 with the Docker driver.
Improvement 4
Issue:
Users have run into an issue where they try starting minikube with the x86 binary, which downloads the x86 kicbase, they then download and use the arm64 binary, but due to kicbase having identical tags uses the existing x86 version but then uses arm64 preload and K8s binaries, resulting in arch mismatches, and causing minikube to fail to start.
Fix:
Our previous check just did
docker images
and then checked for the existence of the expected tag. Improved the check to ensure the image matches the expected arch, if it doesn't it downloads the correct one.