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

How to access postgres running on host OS from inside minikube VM? #3095

Closed
inzem77 opened this issue Aug 27, 2018 · 2 comments
Closed

How to access postgres running on host OS from inside minikube VM? #3095

inzem77 opened this issue Aug 27, 2018 · 2 comments
Labels
area/networking networking issues kind/documentation Categorizes issue or PR as related to documentation. os/linux

Comments

@inzem77
Copy link

inzem77 commented Aug 27, 2018

Hello!
I can't to connect to postgres on my local machine from minikube. I also try to clear all firewall rules (iptables -F, iptables -t nat -F) on local machine and host machine.

$ telnet 192.168.99.1 5432
Connection closed by foreign host
$ ping 192.168.99.1
PING 192.168.99.1 (192.168.99.1): 56 data bytes
64 bytes from 192.168.99.1: seq=0 ttl=64 time=0.305 ms
cat ~/.minikube/machines/minikube/config.json
{
    "ConfigVersion": 3,
    "Driver": {
        "IPAddress": "192.168.99.100",
        "MachineName": "minikube",
        "SSHUser": "docker",
        "SSHPort": 33905,
        "SSHKeyPath": "/home/inzem/.minikube/machines/minikube/id_rsa",
        "StorePath": "/home/inzem/.minikube",
        "SwarmMaster": false,
        "SwarmHost": "",
        "SwarmDiscovery": "",
        "VBoxManager": {},
        "HostInterfaces": {},
        "CPU": 2,
        "Memory": 2048,
        "DiskSize": 20000,
        "NatNicType": "82540EM",
        "Boot2DockerURL": "file:///home/inzem/.minikube/cache/iso/minikube-v0.20.0.iso",
        "Boot2DockerImportVM": "",
        "HostDNSResolver": false,
        "HostOnlyCIDR": "192.168.99.1/24",
        "HostOnlyNicType": "82540EM",
        "HostOnlyPromiscMode": "deny",
        "UIType": "headless",
        "HostOnlyNoDHCP": false,
        "NoShare": false,
        "DNSProxy": true,
        "NoVTXCheck": false,
        "ShareFolder": ""
    },
    "DriverName": "virtualbox",
    "HostOptions": {  
        "Driver": "",                                                                                                                                                                                  
        "Memory": 0,
        "Disk": 0,
        "EngineOptions": {
            "ArbitraryFlags": null,
            "Dns": null,
            "GraphDir": "",
            "Env": null,
            "Ipv6": false,
            "InsecureRegistry": [
                "10.0.0.0/24"
            ],
            "Labels": null,
            "LogLevel": "",
            "StorageDriver": "",
            "SelinuxEnabled": false,
            "TlsVerify": false,
            "RegistryMirror": null,
            "InstallURL": ""
        },
        "SwarmOptions": {
            "IsSwarm": false,
            "Address": "",
            "Discovery": "",
            "Agent": false,
            "Master": false,
            "Host": "",
            "Image": "",
            "Strategy": "",
            "Heartbeat": 0,
            "Overcommit": 0,
            "ArbitraryFlags": null,
            "ArbitraryJoinFlags": null,
            "Env": null,
            "IsExperimental": false
        },
        "AuthOptions": {
            "CertDir": "/home/inzem/.minikube",
            "CaCertPath": "/home/inzem/.minikube/certs/ca.pem",
            "CaPrivateKeyPath": "/home/inzem/.minikube/certs/ca-key.pem",
            "CaCertRemotePath": "",
            "ServerCertPath": "/home/inzem/.minikube/machines/server.pem",
            "ServerKeyPath": "/home/inzem/.minikube/machines/server-key.pem",
            "ClientKeyPath": "/home/inzem/.minikube/certs/key.pem",
            "ServerCertRemotePath": "",
            "ServerKeyRemotePath": "",
            "ClientCertPath": "/home/inzem/.minikube/certs/cert.pem",
            "ServerCertSANs": null,
            "StorePath": "/home/inzem/.minikube"
        }
    },
    "Name": "minikube"
}

Environment:
minikube version: v0.20.0
DriverName: "virtualbox"
iso: minikube-v0.20.0.iso

@inzem77
Copy link
Author

inzem77 commented Aug 28, 2018

And from my local machine Ubuntu 18.04 i have access to postgres
telnet 192.168.99.1 5432
Trying 192.168.99.1...
Connected to 192.168.99.1.
Escape character is '^]'.

@tstromberg tstromberg changed the title can't to connect to postgres on my local machine from minikube Unable to connect to host TCP port from within minikube VirtualBox VM Sep 18, 2018
@tstromberg tstromberg added the kind/documentation Categorizes issue or PR as related to documentation. label Sep 19, 2018
@tstromberg tstromberg changed the title Unable to connect to host TCP port from within minikube VirtualBox VM How to access service running on host OS from inside minikube VM? Sep 19, 2018
@tstromberg tstromberg changed the title How to access service running on host OS from inside minikube VM? How to access postgres running on host OS from inside minikube VM? Sep 19, 2018
@tstromberg
Copy link
Contributor

Dupe of #2735

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/networking networking issues kind/documentation Categorizes issue or PR as related to documentation. os/linux
Projects
None yet
Development

No branches or pull requests

2 participants