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

Exposing ingress to a remote host #9116

Closed
suren-khatana opened this issue Aug 29, 2020 · 13 comments
Closed

Exposing ingress to a remote host #9116

suren-khatana opened this issue Aug 29, 2020 · 13 comments
Labels
addon/ingress kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@suren-khatana
Copy link

suren-khatana commented Aug 29, 2020

Hi,
I am running a vagrant box using virtual box (running headless ubuntu 18.04) on windows 10 host machine.
Inside the virtual box, I have minikube set up using docker as the vm-driver
minikube start --memory=6144 --cpus=2 --disk-size=40g --vm-driver=docker --bootstrapper kubeadm --kubernetes-version=1.17.4
My application is exposed via an ingress to the ubuntu machine running inside virtual box and I am able to access the application via wget/cURL
image

On doing minikube IP it gave me the IP of the docker container in which minikube runs

image

Some additional configuration info -
image
image
image

Vagrant file -
image

I would like to access the application from my windows machine's browser , any idea how to achieve that ? vagrant port forwarding doesn't seem to help.

Thanks

@priyawadhwa priyawadhwa added the kind/support Categorizes issue or PR as a support question. label Sep 8, 2020
@priyawadhwa
Copy link

Hey @surensinghkhatana I'm not familiar with vagrant but it looks like you have this in your config:

  config.vm.network "forwarded_port", guest: 80, host: 8080

You could try using minikube tunnel to forward your service to a local port in the ubuntu VM, and replace "guest: 80" with the port that provides. Then, the application should be forwarded to port 8080 on your Windows host.

Let me know if that would helps. More info on tunnel here

@priyawadhwa priyawadhwa added the triage/needs-information Indicates an issue needs more information in order to work on it. label Sep 9, 2020
@suren-khatana
Copy link
Author

Hi @priyawadhwa ,
Thanks for your comment.
I have removed vagrant from the picture now. Minikube is running inside a docker container in a Ubuntu VM running on virtual box.

Some configuration info from my env :
image

image

image

I don't have any LoadBalancer service in my k8s cluster. I tried using minikube tunnel but couldn't understand how to expose a port on Ubuntu VM which could then be mapped to a port on my Host (windows) machine enabling the access to https://fg.iam.example.com/am from my host browser ?

@sharifelgamal
Copy link
Collaborator

I think what you're looking for is ssh port forwarding

@ilya-zuyev
Copy link
Contributor

@surensinghkhatana does ssh port forwarding work for you?

@suren-khatana
Copy link
Author

suren-khatana commented Oct 22, 2020

@ilya-zuyev @sharifelgamal Thanks for your reply, unfortunately it doesn't work still.
Minikube ip as shown in the picture (from with in the VM) is not reachable from my host machine ..

image

@suren-khatana
Copy link
Author

Result of ifconfig inside the VM
image

@medyagh
Copy link
Member

medyagh commented Nov 11, 2020

the problem is, our current Docker driver only listens on 127.0.0.1, which is for security reasons.

we could offer a --listen-remote flag for users who need to listen on non local hosts.

have you tried running minikube driectly on your host ? with either vbox or docker driver?

@medyagh medyagh changed the title Exposing ingress to host windows machine when running minikube in virtualbox (ubuntu VM) with docker driver Exposing ingress to a remote host Nov 25, 2020
@vrybas
Copy link

vrybas commented Dec 25, 2020

the problem is, our current Docker driver only listens on 127.0.0.1, which is for security reasons.
we could offer a --listen-remote flag for users who need to listen on non local hosts.

@medyagh having this flag would be nice. Is there a temporary solution to make minikube running with docker driver inside Virtualbox VM listen for all requests?

@vrybas
Copy link

vrybas commented Dec 28, 2020

@surensinghkhatana were you able to make minikube to listen to external requests?

@suren-khatana
Copy link
Author

suren-khatana commented Dec 28, 2020

@vrybas I decided to move on with microk8s ..

@priyawadhwa
Copy link

Hey @surensinghkhatana sorry to hear that! Looks like there currently isn't a solution for this is in minikube, but if anyone would be interested in contributing one we'd be happy to look through a design proposal

@priyawadhwa priyawadhwa added priority/backlog Higher priority than priority/awaiting-more-evidence. and removed triage/needs-information Indicates an issue needs more information in order to work on it. labels Feb 3, 2021
@sharifelgamal sharifelgamal added addon/ingress kind/feature Categorizes issue or PR as related to a new feature. and removed kind/support Categorizes issue or PR as a support question. labels Mar 10, 2021
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

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 8, 2021
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

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 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon/ingress kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

No branches or pull requests

8 participants