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

Not able to expose with MacOS M1 chip #14041

Closed
Ruitjes opened this issue Apr 25, 2022 · 10 comments
Closed

Not able to expose with MacOS M1 chip #14041

Ruitjes opened this issue Apr 25, 2022 · 10 comments

Comments

@Ruitjes
Copy link

Ruitjes commented Apr 25, 2022

What Happened?

Hello,

I'm following the "Set up Ingress on Minikube" tutorial, but i'm not able to follow all the steps on my Macbook M1 chip.
Everythings works fine until visiting the service via NodePort:
minikube service web --url

The error messaging i'm receiving is:

🏃  Starting tunnel for service web.
❗  Because you are using a Docker driver on darwin, the terminal needs to be open to run it.

I saw some previous comments on the same error message but I was not able to succeed.

Hope someone can help.

Attach the log file

log.txt

Operating System

macOS (Default)

Driver

Docker

@zhan9san
Copy link
Contributor

Does #13806 address it?

@Ruitjes
Copy link
Author

Ruitjes commented Apr 26, 2022

Does #13806 address it?

Not sure what to do here in my case

@klaases
Copy link
Contributor

klaases commented May 25, 2022

Hi @Ruitjes, the change that @zhan9san proposed has now been merged into the minikube codebase. While they code may not yet be a part the latest minikube release, you can still pull the latest minikube code to test out new features.

Would you be able to test out whether @zhan9san's PR helped resolve the issue?

@jsattler
Copy link

I'm still having the same issue on an M1 Mac. When I follow the updated instructions from #13806 I'm not able to get through. Running minikube service hello-minikube1 --url does not print any URL as shown in the docs. Running curl 127.0.0.1:NODE_PORT while leaving the other terminal open results in:

curl: (7) Failed to connect to 127.0.0.1 port 31090 after 5 ms: Connection refused

Help is appreciated!

@zhan9san
Copy link
Contributor

Could you plz provide a minimal reproducible example?

@jsattler
Copy link

jsattler commented May 26, 2022

I'm basically following the steps provided at https://minikube.sigs.k8s.io/docs/handbook/accessing/ with the following setup:

$ minikube version  
minikube version: v1.25.2
commit: 362d5fdc0a3dbee389b3d3f1034e8023e72bd3a7
$ sw_vers
ProductName:	macOS
ProductVersion:	12.3.1
BuildVersion:	21E258
$ docker --version
Docker version 20.10.12, build e91ed57

Starting minikube with the following output:

$ minikube start
😄  minikube v1.25.2 on Darwin 12.3.1 (arm64)
✨  Automatically selected the docker driver
👍  Starting control plane node minikube in cluster minikube
🚜  Pulling base image ...
🔥  Creating docker container (CPUs=2, Memory=1988MB) ...
🐳  Preparing Kubernetes v1.23.3 on Docker 20.10.12 ...
    ▪ kubelet.housekeeping-interval=5m
    ▪ 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

Then I follow the steps provided here https://minikube.sigs.k8s.io/docs/handbook/accessing/#example-of-nodeport with the following output (only difference is the echoserver container version, which is running fine though).

$ kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver-arm:1.8 
deployment.apps/hello-minikube created
$ kubectl expose deployment hello-minikube --type=NodePort --port=8080 
service/hello-minikube exposed
$ kubectl get svc
NAME             TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)          AGE
hello-minikube   NodePort    10.99.152.134   <none>        8080:32215/TCP   34s
kubernetes       ClusterIP   10.96.0.1       <none>        443/TCP          5m40s
$ minikube service hello-minikube --url 

🏃  Starting tunnel for service hello-minikube.
❗  Because you are using a Docker driver on darwin, the terminal needs to be open to run it.
$ kubectl get service hello-minikube --output='jsonpath="{.spec.ports[0].nodePort}"' 
"32215"
$ curl http://127.0.0.1:32215      
curl: (7) Failed to connect to 127.0.0.1 port 32215 after 6 ms: Connection refused

I hope that helps to reproduce, if not please let me know what information is needed. Thanks for your support!

@zhan9san
Copy link
Contributor

I have doubts about your steps.

The next step of Run service tunnel(minikube service hello-minikube --url is Check ssh tunnel in another terminal to get TUNNEL_PORT .

It is different from what you did. We can access it via TUNNEL_PORT instead of nodePort you tried.

Could you try it https://minikube.sigs.k8s.io/docs/handbook/accessing/?

@jsattler
Copy link

jsattler commented May 27, 2022

Sorry for that, I mixed up tunnel and node port. After replacing the node port with the tunnel port it worked as you've documented. Thanks for your help and sorry for the confusion.

I can confirm that the updated documentation (#13806) has the expected result on an M1 Mac.

@klaases
Copy link
Contributor

klaases commented Jun 29, 2022

Hi @jsattler thanks for the confirmation regarding #13806 and thanks @zhan9san for your support.

@klaases klaases closed this as completed Jun 29, 2022
@midhungk79
Copy link

midhungk79 commented Apr 3, 2023

https://prnt.sc/WY43mmy8IjDe

Please look into this. I'm getting curl Error. How can I fix it. Using MacBook m1.

There is no issues to staring minikube and all

https://prnt.sc/q5ZZGsAz4SdR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants