Skip to content
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

minikube can't start an amd64 container on Apple Sillicon #16530

Open
iqHpi opened this issue May 18, 2023 · 8 comments
Open

minikube can't start an amd64 container on Apple Sillicon #16530

iqHpi opened this issue May 18, 2023 · 8 comments
Labels
arch/arm64 co/docker-driver Issues related to kubernetes in container kind/feature Categorizes issue or PR as related to a new feature. os/macos priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@iqHpi
Copy link

iqHpi commented May 18, 2023

What Happened?

I have installed amd64 minikube on my machine (M1 Mac) using below command -

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-amd64
sudo install minikube-darwin-amd64 /usr/local/bin/minikube

Then I started the cluster using -

minikube start

It was able to successfully start a minikube container in docker -

~ docker ps
CONTAINER ID   IMAGE                                 COMMAND                  CREATED         STATUS         PORTS                                                                                                                                  NAMES
37eb01d3f8fa   gcr.io/k8s-minikube/kicbase:v0.0.39   "/usr/local/bin/entr…"   3 minutes ago   Up 3 minutes   127.0.0.1:64125->22/tcp, 127.0.0.1:64126->2376/tcp, 127.0.0.1:64128->5000/tcp, 127.0.0.1:64129->8443/tcp, 127.0.0.1:64127->32443/tcp   minikube

Then, I checked the architecture of the running container and found out it was not amd64.

~ docker exec -it 37eb01d3f8fa uname -m
aarch64

And, since the minikube container is running as aarch64 I can't run amd64 pods inside it. 😭

It looks like a bug to me, since my amd64 minikube actually tried to download and run an amd64 kickbase image but ended up running the aarch64 one.
Screenshot 2023-05-18 at 6 14 17 p m

Here's my Docker info if that helps -

~ docker version
Client:
 Cloud integration: v1.0.31
 Version:           23.0.5
 API version:       1.42
 Go version:        go1.19.8
 Git commit:        bc4487a
 Built:             Wed Apr 26 16:12:52 2023
 OS/Arch:           darwin/arm64
 Context:           default

Server: Docker Desktop 4.19.0 (106363)
 Engine:
  Version:          23.0.5
  API version:      1.42 (minimum version 1.12)
  Go version:       go1.19.8
  Git commit:       94d3ad6
  Built:            Wed Apr 26 16:17:14 2023
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.6.20
  GitCommit:        2806fc1057397dbaeefbea0e4e17bddfbd388f38
 runc:
  Version:          1.1.5
  GitCommit:        v1.1.5-0-gf19387a
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Attach the log file

Here are the logs.

Operating System

macOS (Default)

Driver

Docker

@iqHpi iqHpi changed the title minikube can't start a x86_64 container on Apple Sillicon minikube can't start an amd64 container on Apple Sillicon May 18, 2023
@Jaff
Copy link

Jaff commented Jul 28, 2023

I've installed amd64 minikube on M1 MacBook Pro and when I start I get:

minikube start --driver=docker
[1]    6528 segmentation fault  minikube start --driver=docker

@Dogacel
Copy link

Dogacel commented Dec 31, 2023

Same issue,

I am new to kubernetes and I am following a set of tutorials. I wish minikube supported amd64 emulation so I could have just used the images provided by the tutorial 😆

It also makes a lot of sense in development scenarios. I wish minikube supported rosetta vz pass-through for containers which do not support arm64. Such as docker run --platform=linux/amd64 my-image:v1 works under an aarch64 virtual machine (let's say colima). When I don't specify platform, vz doesn't work thus image is not working. Emulation is a much better choice for devex.

I'll probably end-up using kind because my x86-64 docker containers work pretty well under rosetta emulation.

@tanvirrb
Copy link

tanvirrb commented Feb 6, 2024

Facing the same issue. Can't run amd64 images in minikube.

@afbjorklund
Copy link
Collaborator

Minikube should allow running the node container in emulation.

At least for as long as it takes Kubernetes to update the tutorials...

@afbjorklund afbjorklund added kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. labels Mar 7, 2024
@wSedlacek
Copy link

Installing qemu-user-static in the minikube container worked for me when using the podman driver on macOS.

minikube ssh "sudo apt-get update && sudo apt-get -y install qemu-user-static"
minikube stop
minikube start 

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 14, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jul 14, 2024
@jpsugar-flow
Copy link

/remove-lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch/arm64 co/docker-driver Issues related to kubernetes in container kind/feature Categorizes issue or PR as related to a new feature. os/macos priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

No branches or pull requests

9 participants