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

is there a way for OpenShift running on an OS X host to see the pod IPs created via docker (using boot2docker)? #182

Closed
jstrachan opened this issue Oct 7, 2014 · 5 comments

Comments

@jstrachan
Copy link
Contributor

So I can build OpenShift on my OS X box and run the integration tests (hack/test-cmd.sh) and things work pretty well; docker images, pods, services, replication controllers are all created etc. Yay! :)

However I get output like this in the openshift console: #180 (comment) since the host cannot ping the pod's IP (though I can ping it from inside boot2docker).

I wonder if we can figure out a way of making some kind of network on OS X (or IP address range configuration) so we can see pod IP addresses when running on platforms like OS X; then from the host we'd be able to see the pod IPs addresses (and it'd avoid those errors in the OpenShift console).

I'm thinking here of developers who want to just develop on their host and work with a stand alone OpenShift directly

@jstrachan
Copy link
Contributor Author

aha - @paoloantinori figured this out for me - yay!

On a mac you need to add this, where 192.168.59.103 is the value of "boot2docker ip"

 sudo route -n add  172.17.0.0/16 192.168.59.103

I can now ping the pod IPs from my host!

@jstrachan
Copy link
Contributor Author

I can correctly see the guestbook PHP app at dockerhost:8000 too on my mac so its working nicely!

@VojtechVitek
Copy link
Contributor

Thanks for sharing the route solution! I'm glad it works for you now.

@jstrachan
Copy link
Contributor Author

Incidentally @paoloantinori figured out more networking tricks when working on OS X; so now the host and boot2docker can access all the pod IP addresses and ports directly.

Here's a little wiki page describing how it all works or you can grab the source if you want to reuse any in openshift.

@VojtechVitek
Copy link
Contributor

Nice! You might consider creating a PR against https://github.com/openshift/origin/blob/master/CONTRIBUTING.adoc#develop-locally-on-your-host or against kubernetes.

deads2k pushed a commit to deads2k/origin that referenced this issue May 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants