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

Document how to use Host IP as external IP in minikube for LoadBalancer type Service #511

Closed
tamalsaha opened this issue Sep 19, 2017 · 3 comments

Comments

@tamalsaha
Copy link
Contributor

tamalsaha commented Sep 19, 2017

What I do in this case for voyager is use a service type ClusterIP with an ip fixed (like 10.0.0.150) then create a route to it from my machine

Works with Mac and minikube on virtualbox/vmware providers

sudo route -n delete ${K8S_NETWORK} > /dev/null 2>&1 
  sudo route -n add ${K8S_NETWORK} $(minikube ip)
  interface=$(ifconfig 'bridge0' | grep member | awk '{print $2}' | xargs | awk '{print $1}')
  sudo ifconfig bridge0 -hostfilter ${interface}

Linux version

 sudo ip route add ${K8S_NETWORK} via $(minikube ip)```
@tamalsaha tamalsaha changed the title Using Host IP as external IP in minikube Document how to use Host IP as external IP in minikube for LoadBalancer type Service Sep 19, 2017
@tamalsaha
Copy link
Contributor Author

Thanks @david92rl for this method.

@david92rl
Copy link

K8S_NETWORK usually is 10.0.0.0/24 but it's worth to double check always.
On Linux version adding sudo ip route del ${K8S_NETWORK} at the beginning will prevent you from errors if the rule is already set.

@tamalsaha tamalsaha added this to the 5.0.0 milestone Oct 4, 2017
@tamalsaha tamalsaha modified the milestones: 5.0.0, 4.1.0 Oct 12, 2017
@tamalsaha tamalsaha removed this from the 5.0.1 milestone Feb 21, 2018
@tamalsaha
Copy link
Contributor Author

#895

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

No branches or pull requests

2 participants