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

Cannot connect to service from localhost on M1 Mac #12036

Closed
benjamin-brady opened this issue Jul 22, 2021 · 7 comments
Closed

Cannot connect to service from localhost on M1 Mac #12036

benjamin-brady opened this issue Jul 22, 2021 · 7 comments
Labels
co/docker-driver Issues related to kubernetes in container kind/support Categorizes issue or PR as a support question.

Comments

@benjamin-brady
Copy link

benjamin-brady commented Jul 22, 2021

I'm trying to do the getting started example on an M1 Macbook Air but I'm unable to access the service from the browser. Minikube dashboard works however so that gives me hope that it is possible.
Note that the echoserver:1.4 image used in the docs crashed so I substituted it for an arm64 compatible fork (claudiubelu/echoserver:2.3).

Steps to reproduce the issue:

~ % minikube start
😄  minikube v1.22.0 on Darwin 11.3.1 (arm64)
✨  Automatically selected the docker driver
👍  Starting control plane node minikube in cluster minikube
🚜  Pulling base image ...
💾  Downloading Kubernetes v1.21.2 preload ...
    > preloaded-images-k8s-v11-v1...: 522.45 MiB / 522.45 MiB  100.00% 7.27 MiB
    > gcr.io/k8s-minikube/kicbase...: 326.19 MiB / 326.19 MiB  100.00% 3.68 MiB
🔥  Creating docker container (CPUs=2, Memory=1988MB) ...
🐳  Preparing Kubernetes v1.21.2 on Docker 20.10.7 ...
    ▪ 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
...
~ % kubectl create deployment hello-minikube --image=claudiubelu/echoserver:2.3
~ % kubectl expose deployment hello-minikube --type=NodePort --port=8080
~ % kubectl get services hello-minikube
NAME             TYPE       CLUSTER-IP      EXTERNAL-IP   PORT(S)          AGE
hello-minikube   NodePort   10.109.188.73   <none>        8080:32048/TCP   9s
~ % service/hello-minikube exposed
~ % minikube service hello-minikube
|-----------|----------------|-------------|---------------------------|
| NAMESPACE |      NAME      | TARGET PORT |            URL            |
|-----------|----------------|-------------|---------------------------|
| default   | hello-minikube |        8080 | http://192.168.49.2:32048 |
|-----------|----------------|-------------|---------------------------|
🏃  Starting tunnel for service hello-minikube.
|-----------|----------------|-------------|------------------------|
| NAMESPACE |      NAME      | TARGET PORT |          URL           |
|-----------|----------------|-------------|------------------------|
| default   | hello-minikube |             | http://127.0.0.1:64409 |
|-----------|----------------|-------------|------------------------|
🎉  Opening service default/hello-minikube in default browser...
❗  Because you are using a Docker driver on darwin, the terminal needs to be open to run it.

Safari opens to http://127.0.0.1:64855 which is dead (no connection).

~ % kubectl port-forward service/hello-minikube 7080:8080
Forwarding from 127.0.0.1:7080 -> 8080
Forwarding from [::1]:7080 -> 8080
Handling connection for 7080
Handling connection for 7080

I get no connection when browsing to http://127.0.0.1:7080 or http://localhost:7080/

@RA489
Copy link

RA489 commented Jul 26, 2021

/kind support

@k8s-ci-robot k8s-ci-robot added the kind/support Categorizes issue or PR as a support question. label Jul 26, 2021
@RA489 RA489 added the co/docker-driver Issues related to kubernetes in container label Jul 26, 2021
@drobit
Copy link

drobit commented Jul 30, 2021

Hey, @bradyben.
Can you try it with --image=k8s.gcr.io/echoserver-arm:1.8

@benjamin-brady
Copy link
Author

That image fixed the issue. It would be nice to update the docs but I'll close this issue.

@8bitreid
Copy link

8bitreid commented Mar 27, 2022

Hey, @bradyben. Can you try it with --image=k8s.gcr.io/echoserver-arm:1.8

try what? can you be more specific, do you mean this kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver-arm:1.8 ?

@drinkbeer
Copy link

Hey, @bradyben. Can you try it with --image=k8s.gcr.io/echoserver-arm:1.8

This image works in my M1 Macbook: kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver-arm:1.8

Thank you

@yogeshwar-chaudhari-20
Copy link

yogeshwar-chaudhari-20 commented Apr 29, 2022

@drinkbeer @benjamin-brady @drobit
--image=k8s.gcr.io/echoserver-arm:1.8 - this image is not working for me - M1 pro

@rodneywells01
Copy link

Chiming in, --image=k8s.gcr.io/echoserver-arm:1.8 also does not work for me. Also M1 Pro. Logs are the following: 2022/05/07 22:16:07 [emerg] 11#11: io_setup() failed (38: Function not implemented)

Possibly nginx related?

alinoaimi added a commit to alinoaimi/minikube that referenced this issue Aug 28, 2022
the command: 'kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.4' doesn't work on arm64 (tested on macOS, m2 processor), 
more details: kubernetes#12036 (comment)
added the arm64 image, to save others time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/docker-driver Issues related to kubernetes in container kind/support Categorizes issue or PR as a support question.
Projects
None yet
Development

No branches or pull requests

8 participants