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

Projects
None yet
2 participants
@tamalsaha
Copy link
Member

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

This comment has been minimized.

Copy link
Member Author

commented Sep 19, 2017

Thanks @david92rl for this method.

@david92rl

This comment has been minimized.

Copy link

commented Sep 19, 2017

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

This comment has been minimized.

Copy link
Member Author

commented Feb 25, 2018

@tamalsaha tamalsaha closed this Feb 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.