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 service <servicename> and ingress both are not working on windows 11 #13823

Closed
hnviradiya opened this issue Mar 21, 2022 · 19 comments
Closed
Labels
co/service issues related to the service feature kind/support Categorizes issue or PR as a support question. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.

Comments

@hnviradiya
Copy link

What Happened?

I simply followed following steps. I am using windows 11.

https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/

From above link I executed exact steps as following.

  1. minikube addons enable ingress
  2. kubectl create deployment web --image=gcr.io/google-samples/hello-app:1.0
  3. kubectl expose deployment web --type=NodePort --port=8080
  4. minikube service web

Here at 4th step browser hangs and times out (below screenshot of browser opened by minikube service web).

image

Following is the screenshot when I try to curl url given by minikube service web --url

image

I tried posting on stackoverflow, but hasn't been solved yet. I even formatted my entire pc and installed everything fresh. But nothing worked. I am unable to find any open issue. Sorry if there is already open item, please provide me link to that.

https://stackoverflow.com/questions/71538136/err-connection-timed-out-kubernetes-minikube-service

minikube service web --alsologtostderr
I0321 18:31:49.561082    9592 out.go:297] Setting OutFile to fd 92 ...
I0321 18:31:49.562083    9592 out.go:344] TERM=,COLORTERM=, which probably does not support color
I0321 18:31:49.562083    9592 out.go:310] Setting ErrFile to fd 96...
I0321 18:31:49.563082    9592 out.go:344] TERM=,COLORTERM=, which probably does not support color
W0321 18:31:49.572105    9592 root.go:293] Error reading config file at C:\Users\meera\.minikube\config\config.json: open C:\Users\meera\.minikube\config\config.json: The system cannot find the file specified.
I0321 18:31:49.573081    9592 mustload.go:65] Loading cluster: minikube
I0321 18:31:49.574081    9592 config.go:176] Loaded profile config "minikube": Driver=docker, ContainerRuntime=docker, KubernetesVersion=v1.23.3
I0321 18:31:49.583112    9592 cli_runner.go:133] Run: docker container inspect minikube --format={{.State.Status}}
I0321 18:31:50.509241    9592 host.go:66] Checking if "minikube" exists ...
I0321 18:31:50.514276    9592 cli_runner.go:133] Run: docker container inspect -f "'{{(index (index .NetworkSettings.Ports "8443/tcp") 0).HostPort}}'" minikube
I0321 18:31:51.404779    9592 api_server.go:165] Checking apiserver status ...
I0321 18:31:51.411356    9592 ssh_runner.go:195] Run: sudo pgrep -xnf kube-apiserver.*minikube.*
I0321 18:31:51.415825    9592 cli_runner.go:133] Run: docker container inspect -f "'{{(index (index .NetworkSettings.Ports "22/tcp") 0).HostPort}}'" minikube
I0321 18:31:52.332336    9592 sshutil.go:53] new ssh client: &{IP:127.0.0.1 Port:50293 SSHKeyPath:C:\Users\meera\.minikube\machines\minikube\id_rsa Username:docker}
I0321 18:31:52.465183    9592 ssh_runner.go:235] Completed: sudo pgrep -xnf kube-apiserver.*minikube.*: (1.0538263s)
I0321 18:31:52.471316    9592 ssh_runner.go:195] Run: sudo egrep ^[0-9]+:freezer: /proc/1676/cgroup
I0321 18:31:52.481738    9592 api_server.go:181] apiserver freezer: "19:freezer:/docker/e1250b013fbf7afe0e41b1c600c0a987db6833698eed685e67fd4fbdc56854f9/kubepods/burstable/podcd6e47233d36a9715b0ab9632f871843/b4bb5dcde9c8db0e0be23034cfa9d29d882b013264621209b92a7def9d496df5"
I0321 18:31:52.488336    9592 ssh_runner.go:195] Run: sudo cat /sys/fs/cgroup/freezer/docker/e1250b013fbf7afe0e41b1c600c0a987db6833698eed685e67fd4fbdc56854f9/kubepods/burstable/podcd6e47233d36a9715b0ab9632f871843/b4bb5dcde9c8db0e0be23034cfa9d29d882b013264621209b92a7def9d496df5/freezer.state
I0321 18:31:52.498657    9592 api_server.go:203] freezer state: "THAWED"
I0321 18:31:52.498657    9592 api_server.go:240] Checking apiserver healthz at https://127.0.0.1:50297/healthz ...
I0321 18:31:52.509567    9592 api_server.go:266] https://127.0.0.1:50297/healthz returned 200:
ok
I0321 18:31:52.509567    9592 host.go:66] Checking if "minikube" exists ...
I0321 18:31:52.514810    9592 cli_runner.go:133] Run: docker container inspect -f "{{range .NetworkSettings.Networks}}{{.IPAddress}},{{.GlobalIPv6Address}}{{end}}" minikube
I0321 18:31:53.475369    9592 service.go:214] Found service: &Service{ObjectMeta:{web  default  8522fc44-5589-44cc-8a71-241af528ac61 1131 0 2022-03-21 18:06:11 +0530 IST <nil> <nil> map[app:web] map[] [] []  [{kubectl-expose Update v1 2022-03-21 18:06:11 +0530 IST FieldsV1 {"f:metadata":{"f:labels":{".":{},"f:app":{}}},"f:spec":{"f:externalTrafficPolicy":{},"f:internalTrafficPolicy":{},"f:ports":{".":{},"k:{\"port\":8080,\"protocol\":\"TCP\"}":{".":{},"f:port":{},"f:protocol":{},"f:targetPort":{}}},"f:selector":{},"f:sessionAffinity":{},"f:type":{}}} }]},Spec:ServiceSpec{Ports:[]ServicePort{ServicePort{Name:,Protocol:TCP,Port:8080,TargetPort:{0 8080 },NodePort:31935,AppProtocol:nil,},},Selector:map[string]string{app: web,},ClusterIP:10.106.239.80,Type:NodePort,ExternalIPs:[],SessionAffinity:None,LoadBalancerIP:,LoadBalancerSourceRanges:[],ExternalName:,ExternalTrafficPolicy:Cluster,HealthCheckNodePort:0,PublishNotReadyAddresses:false,SessionAffinityConfig:nil,IPFamilyPolicy:*SingleStack,ClusterIPs:[10.106.239.80],IPFamilies:[IPv4],AllocateLoadBalancerNodePorts:nil,LoadBalancerClass:nil,InternalTrafficPolicy:*Cluster,},Status:ServiceStatus{LoadBalancer:LoadBalancerStatus{Ingress:[]LoadBalancerIngress{},},Conditions:[]Condition{},},}
I0321 18:31:53.483849    9592 service.go:214] Found service: &Service{ObjectMeta:{web  default  8522fc44-5589-44cc-8a71-241af528ac61 1131 0 2022-03-21 18:06:11 +0530 IST <nil> <nil> map[app:web] map[] [] []  [{kubectl-expose Update v1 2022-03-21 18:06:11 +0530 IST FieldsV1 {"f:metadata":{"f:labels":{".":{},"f:app":{}}},"f:spec":{"f:externalTrafficPolicy":{},"f:internalTrafficPolicy":{},"f:ports":{".":{},"k:{\"port\":8080,\"protocol\":\"TCP\"}":{".":{},"f:port":{},"f:protocol":{},"f:targetPort":{}}},"f:selector":{},"f:sessionAffinity":{},"f:type":{}}} }]},Spec:ServiceSpec{Ports:[]ServicePort{ServicePort{Name:,Protocol:TCP,Port:8080,TargetPort:{0 8080 },NodePort:31935,AppProtocol:nil,},},Selector:map[string]string{app: web,},ClusterIP:10.106.239.80,Type:NodePort,ExternalIPs:[],SessionAffinity:None,LoadBalancerIP:,LoadBalancerSourceRanges:[],ExternalName:,ExternalTrafficPolicy:Cluster,HealthCheckNodePort:0,PublishNotReadyAddresses:false,SessionAffinityConfig:nil,IPFamilyPolicy:*SingleStack,ClusterIPs:[10.106.239.80],IPFamilies:[IPv4],AllocateLoadBalancerNodePorts:nil,LoadBalancerClass:nil,InternalTrafficPolicy:*Cluster,},Status:ServiceStatus{LoadBalancer:LoadBalancerStatus{Ingress:[]LoadBalancerIngress{},},Conditions:[]Condition{},},}
I0321 18:31:53.484365    9592 host.go:66] Checking if "minikube" exists ...
I0321 18:31:53.491643    9592 cli_runner.go:133] Run: docker container inspect -f "{{range .NetworkSettings.Networks}}{{.IPAddress}},{{.GlobalIPv6Address}}{{end}}" minikube
I0321 18:31:54.396006    9592 cli_runner.go:133] Run: docker container inspect -f "'{{(index (index .NetworkSettings.Ports "22/tcp") 0).HostPort}}'" minikube
I0321 18:31:55.306620    9592 out.go:176] * Starting tunnel for service web.
* Starting tunnel for service web.
I0321 18:31:56.308200    9592 out.go:176] * Opening service default/web in default browser...
* Opening service default/web in default browser...
W0321 18:31:56.574540    9592 out.go:241] ! Because you are using a Docker driver on windows, the terminal needs to be open to run it.
! Because you are using a Docker driver on windows, the terminal needs to be open to run it.

Attach the log file

log.txt

Operating System

Windows

Driver

Docker

@spowelljr
Copy link
Member

Hi @hnviradiya, thanks for reporting your issue with minikube!

This may be a duplicate of #13736, there's a comment in the issue (#13736 (comment)) that has a link to a fixed binary for the reported issue. Could you try downloading the binary in the comment and try using it and see if that resolves your issue, thanks!

@spowelljr spowelljr added kind/support Categorizes issue or PR as a support question. triage/needs-information Indicates an issue needs more information in order to work on it. co/service issues related to the service feature labels Mar 21, 2022
@hnviradiya
Copy link
Author

Okk. Now service issue got fixed with this. But now on top of that service I have ingress created that is not being accessed. Have created from following documentation. This thing works when I use virtualbox driver. It is getting timed out with docker driver.

https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/

@hnviradiya hnviradiya changed the title Minikube service <servicename> is not working on windows 11 Minikube service <servicename> and ingress both are not working on windows 11 Mar 26, 2022
@sharifelgamal
Copy link
Collaborator

The docker driver needs minikube tunnel to have ingress work at all. Run minikube tunnel first in another terminal (it will look like it's hanging, don't worry, it's not), then try to enable ingress again.

@sharifelgamal sharifelgamal added the priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. label Apr 13, 2022
@hnviradiya
Copy link
Author

hnviradiya commented Apr 13, 2022

This part needs to be there in documentation below? It seems to be not mentioned there. Moreover on ubuntu I didn't require minikube tunnel. There it is working perfectly fine. Issue is only on windows (11)

https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/

@klaases
Copy link
Contributor

klaases commented May 18, 2022

Hi @hnviradiya, for clarification, the minikube tunnel command will need to be run in a separate terminal window than the one you are working in.

Similar to SSH tunneling, the tunnel itself is a process that continues to run during the duration of the connection. If this process is stopped to run another command, then the tunnel will no longer be working.

Does this help get things working?

@sharifelgamal
Copy link
Collaborator

This part needs to be there in documentation below? It seems to be not mentioned there. Moreover on ubuntu I didn't require minikube tunnel. There it is working perfectly fine. Issue is only on windows (11)

https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/

Yeah, only the docker driver on macOS and Windows need minikube tunnel for ingress to work properly. I'd be happy to review a documentation PR that adds that.

@sharifelgamal sharifelgamal removed the triage/needs-information Indicates an issue needs more information in order to work on it. label Jun 1, 2022
@akshat-khare
Copy link

This is still not working. I don't know how do we debug something which is basically a hello-world to the whole application!

@edtshuma
Copy link

Okk. Now service issue got fixed with this. But now on top of that service I have ingress created that is not being accessed. Have created from following documentation. This thing works when I use virtualbox driver. It is getting timed out with docker driver.

https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/

@hnviradiya How did you install the binary on Windows. I cannot seem to see the existing file which has to be replaced:

image

@sitesh-sumo
Copy link

I was facing the above issue and port-forwarding resolved the issue.
If you are still following the above issue where your page doesn't open up in your browser client follow the steps.

kubectl get service
image

Suppose I want my webapp-service to work for now

kubectl port-forward service/webapp-service 30100:3000
image

Now you access localhost:30100 and bingo!!!
image

@hnviradiya
Copy link
Author

Okk. Now service issue got fixed with this. But now on top of that service I have ingress created that is not being accessed. Have created from following documentation. This thing works when I use virtualbox driver. It is getting timed out with docker driver.
https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/

@hnviradiya How did you install the binary on Windows. I cannot seem to see the existing file which has to be replaced:

image

I hadn't installed it. I was executing this exe through cmd and passed parameters in cmd.

@sitesh-sumo
Copy link

@hnviradiya sorry I am on a mac.

@hnviradiya
Copy link
Author

@hnviradiya sorry I am on a mac.

Seems Mac binary isn't provided there (nor have I used Mac ever). May be @spowelljr can help you on that.

@edtshuma
Copy link

Okk. Now service issue got fixed with this. But now on top of that service I have ingress created that is not being accessed. Have created from following documentation. This thing works when I use virtualbox driver. It is getting timed out with docker driver.
https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/

@hnviradiya How did you install the binary on Windows. I cannot seem to see the existing file which has to be replaced:
image

I hadn't installed it. I was executing this exe through cmd and passed parameters in cmd.

@hnviradiya That's the part I'm missing I guess. What parameters did you pass ? If you can assist with the exact command you ran in command line

@hnviradiya
Copy link
Author

Okk. Now service issue got fixed with this. But now on top of that service I have ingress created that is not being accessed. Have created from following documentation. This thing works when I use virtualbox driver. It is getting timed out with docker driver.
https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/

@hnviradiya How did you install the binary on Windows. I cannot seem to see the existing file which has to be replaced:
image

I hadn't installed it. I was executing this exe through cmd and passed parameters in cmd.

@hnviradiya That's the part I'm missing I guess. What parameters did you pass ? If you can assist with the exact command you ran in command line

Basically executed all commands from below links.

https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/

But instead of "minikube" you will have to go to that exe path and execute there with "minikube-windows-amd64.exe"

@LTL-Upgrading
Copy link

the port forward also works for me on Windows, where minikube run with docker engine. However, I m not clear about why the NodePort service is not really connect to the local machine, i.e. out of the minikube cluster. Port forward is just another function and step to complement this tho, not a basic Kubernetes component.

@k8s-triage-robot
Copy link

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

This bot triages issues and PRs 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 or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR 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 Sep 30, 2022
@k8s-triage-robot
Copy link

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

This bot triages issues and PRs 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 or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR 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 Oct 30, 2022
@k8s-triage-robot
Copy link

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

This bot triages 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:

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

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

/close not-planned

@k8s-ci-robot k8s-ci-robot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 29, 2022
@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

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

This bot triages 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:

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

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

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/service issues related to the service feature kind/support Categorizes issue or PR as a support question. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.
Projects
None yet
Development

No branches or pull requests

10 participants