{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/12660","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/12660/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/12660/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/12660/events","html_url":"https://github.com/kubernetes/kubernetes/issues/12660","id":100802930,"number":12660,"title":"Can't interact with service's ip ","user":{"login":"zmsp","id":949058,"avatar_url":"https://avatars.githubusercontent.com/u/949058?v=3","gravatar_id":"","url":"https://api.github.com/users/zmsp","html_url":"https://github.com/zmsp","followers_url":"https://api.github.com/users/zmsp/followers","following_url":"https://api.github.com/users/zmsp/following{/other_user}","gists_url":"https://api.github.com/users/zmsp/gists{/gist_id}","starred_url":"https://api.github.com/users/zmsp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zmsp/subscriptions","organizations_url":"https://api.github.com/users/zmsp/orgs","repos_url":"https://api.github.com/users/zmsp/repos","events_url":"https://api.github.com/users/zmsp/events{/privacy}","received_events_url":"https://api.github.com/users/zmsp/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/help-wanted","name":"help-wanted","color":"006b75"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/support","name":"kind/support","color":"eb6420"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/team/any","name":"team/any","color":"d2b48c"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/team/support","name":"team/support","color":"d2b48c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-08-13T15:45:32Z","updated_at":"2015-08-19T19:36:52Z","closed_at":null,"body":"Hello, we are running a postgres pod and we are able to connect to it using the minion's ip however we want to couple it with a service. We are running this locally using libvirt VM. Our service validates but doesn't seem to be running correctly. We can't interact with the service ip. Our goal is to use the service's ip to connect to postgresql using psql client. \r\n\r\nHere are our codes\r\nService\r\n\r\n```yaml\r\napiVersion: v1\r\nkind: Service\r\nmetadata: \r\n  name: postgresql\r\n  labels:\r\n    component: postgresql\r\nspec: \r\n  ports:\r\n    - port: 5432\r\n      targetPort: 5432\r\n      nodePort: 0\r\n  selector: \r\n    name: postgres-pod\r\n    context: postgres-pod-k9\r\n```\r\n\r\npod\r\n\r\n```yaml\r\napiVersion: v1\r\nkind: Pod\r\nmetadata:\r\n  name: postgres-pod\r\n  labels:\r\n    name: postgres-pod\r\n    context: postgres-pod-k9\r\nspec:\r\n  containers:\r\n  - image: postgres:latest\r\n    name: postgres\r\n    volumeMounts:\r\n      - name: nfs\r\n        mountPath: /var/lib/postgresql/data\r\n    ports:\r\n      - containerPort: 5432\r\n        hostPort: 5432\r\n        name: pg-port\r\n  volumes:\r\n    - name: nfs\r\n      nfs:\r\n       server: 10.20.20.190\r\n       path: /postgres\r\n```\r\n\r\nThank you. "},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/132753635","html_url":"https://github.com/kubernetes/kubernetes/issues/12660#issuecomment-132753635","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/12660","id":132753635,"user":{"login":"zmsp","id":949058,"avatar_url":"https://avatars.githubusercontent.com/u/949058?v=3","gravatar_id":"","url":"https://api.github.com/users/zmsp","html_url":"https://github.com/zmsp","followers_url":"https://api.github.com/users/zmsp/followers","following_url":"https://api.github.com/users/zmsp/following{/other_user}","gists_url":"https://api.github.com/users/zmsp/gists{/gist_id}","starred_url":"https://api.github.com/users/zmsp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zmsp/subscriptions","organizations_url":"https://api.github.com/users/zmsp/orgs","repos_url":"https://api.github.com/users/zmsp/repos","events_url":"https://api.github.com/users/zmsp/events{/privacy}","received_events_url":"https://api.github.com/users/zmsp/received_events","type":"User","site_admin":false},"created_at":"2015-08-19T19:36:52Z","updated_at":"2015-08-19T19:36:52Z","body":"> So this line:\r\n\r\nThanks that [debugging service page] (http://kubernetes.io/v1.0/docs/user-guide/debugging-services.html) really explains things well and gives a hands on insights on how the service really works.\r\n\r\nI went through all the steps and all the test it specified on the debugging service doc and gave me positive results. I can connect to the service ip and port from the minion node as well as using the endpoint ip that service creates on the host. But I can't really connect to it from the host machine using the ip specified on cluser ip bellow (`clusterIP: 10.11.58.113`) which creates a service with the given ip . \r\n\r\n\r\nSo my final question, is it possible and are we suppose to be able to connect to the service using the cluster ip from external machines such as the host machine in the case of libvirt-coreos? Thanks. \r\n\r\n\r\nThis is my service \r\n```\r\napiVersion: v1\r\nkind: Service\r\nmetadata: \r\n  name: postgresql\r\n  labels:\r\n    component: postgresql\r\nspec:\r\n  clusterIP: 10.11.58.113\r\n  ports:\r\n    - port: 9999\r\n      targetPort: 5432\r\n      nodePort: 0\r\n  selector: \r\n    name: postgresql\r\n    context: postgresql\r\n```"}}