-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Pod not accessible on NodePort via the Windows 10 host machine. #9499
Comments
Can you please include the output of the |
Here is the λ minikube start
|
Does I suspect this may be the case of I unfortunately don't have a Windows machine to double-check this with. On macOS with Dockerw,
but
If it doesn't work -- could you check if the instructions from the "Deploy applications" part of https://minikube.sigs.k8s.io/docs/start/ work on your machine? |
Minikube tunneling worked fine, but it's not something I want to have to do while developing, so I've switched to plain-old Docker-desktop's built-in Kubernetes instead. |
Also having this problem when using the Docker driver with minikube on Windows 10. I can't access the pods exposed via nodeport services. |
Closing as working-as-intended. If you need to access a NodePort service, see the instructions on https://minikube.sigs.k8s.io/docs/start/ for your options ( |
NodePort is designed to forward to the host machine. It doesn't "work as intended" unless you simply mean you intend for it to not work. Anyway, not going to push this as I've moved onto another kubernetes implementation that actually works. |
Also have same problem with accessing pod using curl after exposing port via service. $ minikube version $ minikube start
P.S. |
It seems like the issue is still present. The port-forward feature does work. > minikube version
minikube version: v1.25.2
commit: 362d5fdc0a3dbee389b3d3f1034e8023e72bd3a7 Output from > minikube start
😄 minikube v1.25.2 on Microsoft Windows 11 Home 10.0.22000 Build 22000
▪ MINIKUBE_ACTIVE_DOCKERD=minikube
✨ Using the docker driver based on existing profile
👍 Starting control plane node minikube in cluster minikube
🚜 Pulling base image ...
📌 Noticed you have an activated docker-env on docker driver in this terminal:
❗ Please re-eval your docker-env, To ensure your environment variables have updated ports:
'minikube -p minikube docker-env'
🔄 Restarting existing docker container for "minikube" ...
🐳 Preparing Kubernetes v1.23.3 on Docker 20.10.12 ...
▪ kubelet.housekeeping-interval=5m
🔎 Verifying Kubernetes components...
▪ Using image kubernetesui/dashboard:v2.3.1
▪ Using image kubernetesui/metrics-scraper:v1.0.7
▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟 Enabled addons: storage-provisioner, dashboard, default-storageclass
🏄 Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default I'm using minikube for local development and testing, and so using the port-forward workaround will work for me, however I have spent a significant amount of time trying to figure this out. Fixing this would save a lot of people a lot of time. Best regards. |
Have similar issue, from event log, no matter which service port is allocated, always get the warning of "address already in use" PS > kubectl expose deployment hello-minikube --type=NodePort --port=8080 PS > kubectl get services hello-minikube PS > kubectl get events PS > minikube service hello-minikube
PS > minikube service list So, the why it still provide the URL with the port which fails to open? and why it always fails to open the TCP port in minikube vm? |
You can simply run |
Until now 2023. I couldn't access NodeIP using docker-driver on windows 10 machine. |
2024 - Still a problem. On windows 10, Running Running Port is listening on the pod. Tested. THIS appears to be a problem with minikube on windows, plain and simple. Honestly I would encourage a re-open of the bug.FWIW if I am out of bounds here: If tunneling is not supported on windows 10, or nodeports are not supported on windows 10, then please make that clear. If it is supported, then add documentation explaining precisely how to exercise this specific use case, as it's a struggle not just for me but others as well. If this use case is extra problematic on windows 10, for whatever reason, then increase the quality of your log messages so users don't waste two hours fiddling around with inane details just to get a connection to a minikube hosted service. If I may be bold, the current experience borders on ridiculous. Let me repeat one detail, running EDIT:I deleted minikube and switched to the native Kubernetes that ships with Docker Desktop. It works the first time, out of the box, and no extra tunneling step required. The nodePort is opened on the localhost and works. |
I'm struggling with Minikube on Windows 10. I have a pod and a service, but the nodePort on the service does not seem to work. When accessing my service using curl I get:
curl: (7) Failed to connect to 192.168.49.2 port 31985: Timed out This site can’t be reached
I honestly don't know if this is a Minikube issue, or a Kubernetes issue, or a Skaffold issue, or a plain windows networking issue. Hoping someone can point me in the right direction, and hopefully help folks with a similar issue in future.
Steps to reproduce the issue:
minikube start
(no extra parameters)kubectl apply
to release pod and service (see yaml below)minikube service list
to get url to the pod.Kubebernetes yaml being applied
I
kubectl apply
the following to the minikube cluster:Kubectl is definitely pointing to minikube:
![image](https://user-images.githubusercontent.com/915354/96598800-8a32c980-12ef-11eb-84fc-7b8e00468a85.png)
The service is running and points to the pod, see endpoint:
![image](https://user-images.githubusercontent.com/915354/96599018-c36b3980-12ef-11eb-9e26-e89fd33b8a31.png)
I can connect to the pod from within the cluster, no problem:
I can also connect to the pod via the service within the cluster (using the service port):
Minikube shows that the service can be accessed at http://192.168.49.2:31985
But no luck when I access that url from the host machine using curl or the browser:
I tried accessing the same port on the minikube ip for good measure, but no luck either:
I added windows defender firewall rules (both incoming and outgoing) to allow traffic on that port. Not sure what else I can do... can anyone help?
Version information
Minikube:
Kubectl:
Windows:
The text was updated successfully, but these errors were encountered: