diff --git a/minikube.py b/minikube.py index bcb3e1fdc..c3d90482c 100644 --- a/minikube.py +++ b/minikube.py @@ -11,6 +11,7 @@ import stat import tarfile import yaml +import platform from run import run_command from urllib import urlretrieve from urllib2 import urlopen @@ -83,6 +84,10 @@ def download_minikube(): def get_ip(): # http://stackoverflow.com/a/28950776/671626 + os_name = platform.system() + if os_name == "Darwin": + return socket.gethostbyname(socket.gethostname()) + s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) try: # doesn't even have to be reachable