{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/6437","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/6437/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/6437/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/6437/events","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/issues/6437","id":66272010,"number":6437,"title":"kube2sky should expose IP-port pairs of the pods","user":{"login":"alml","id":7124476,"avatar_url":"https://avatars.githubusercontent.com/u/7124476?v=3","gravatar_id":"","url":"https://api.github.com/users/alml","html_url":"https://github.com/alml","followers_url":"https://api.github.com/users/alml/followers","following_url":"https://api.github.com/users/alml/following{/other_user}","gists_url":"https://api.github.com/users/alml/gists{/gist_id}","starred_url":"https://api.github.com/users/alml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alml/subscriptions","organizations_url":"https://api.github.com/users/alml/orgs","repos_url":"https://api.github.com/users/alml/repos","events_url":"https://api.github.com/users/alml/events{/privacy}","received_events_url":"https://api.github.com/users/alml/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/priority/P2","name":"priority/P2","color":"fbca04"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/team/cluster","name":"team/cluster","color":"d2b48c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":20,"created_at":"2015-04-04T04:05:33Z","updated_at":"2015-04-05T14:12:27Z","closed_at":null,"body":"Use case:\r\nPrometheus uses DNS-SD for instance discovery (http://prometheus.io/docs/operating/configuration/). To allow its use with Kubernetes, all Pods should be exposed in DNS.\r\n\r\nCurrent state:\r\nCurrently kube2sky exposes only IP:port pairs of the services.\r\n\r\nDesired state:\r\nAdditional flag should allow kube2sky to expose the pods in the similar way:\r\n\r\n$ host -t srv someservice.pod.kubernetes.local\r\nsomeservice.default.pod.kubernetes.local has SRV record 10 100 80 9gvmk.someservice.default.pod.kubernetes.local.\r\nsomeservice.default.pod.kubernetes.local has SRV record 10 100 80 akhj2.someservice.default.pod.kubernetes.local.\r\nsomeservice.default.pod.kubernetes.local has SRV record 10 100 80 8sh3j.someservice.default.pod.kubernetes.local.\r\n"},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments/89777684","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/issues/6437#issuecomment-89777684","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/6437","id":89777684,"user":{"login":"alml","id":7124476,"avatar_url":"https://avatars.githubusercontent.com/u/7124476?v=3","gravatar_id":"","url":"https://api.github.com/users/alml","html_url":"https://github.com/alml","followers_url":"https://api.github.com/users/alml/followers","following_url":"https://api.github.com/users/alml/following{/other_user}","gists_url":"https://api.github.com/users/alml/gists{/gist_id}","starred_url":"https://api.github.com/users/alml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alml/subscriptions","organizations_url":"https://api.github.com/users/alml/orgs","repos_url":"https://api.github.com/users/alml/repos","events_url":"https://api.github.com/users/alml/events{/privacy}","received_events_url":"https://api.github.com/users/alml/received_events","type":"User","site_admin":false},"created_at":"2015-04-05T14:12:27Z","updated_at":"2015-04-05T14:12:27Z","body":"I'm using two separate subdomains for services and pods. Look at the\nREADME.md in my PR.\n\nOn Sun, Apr 5, 2015, 03:43 Tim Hockin <notifications@github.com> wrote:\n\n> I have been discussin g with miekg how to get an A record for foo.bar.local\n> AND get SRV and A records for x.foo.bar.local with skyDNS - have you solved\n> that part?\n> On Apr 4, 2015 6:36 PM, \"Alexander Lourier\" <notifications@github.com>\n> wrote:\n>\n> > It's a regular SRV query that does it.\n> >\n> > On Sat, Apr 4, 2015, 18:35 Alexandr Lurye <alml@google.com> wrote:\n> >\n> > > SkyDNS returns all entries for a subdomain automatically. I don't need\n> to\n> > > do anything special on the kube2sky side.\n> > >\n> > > On Sat, Apr 4, 2015, 17:58 thockin-cc <notifications@github.com>\n> wrote:\n> > >\n> > >> What would all pods in a new subdomain do for this? This will run\n> afoul\n> > of\n> > >> the 64K limit in TXT records before long.\n> > >>\n> > >> And how do you scrape a whole subdomain - axfr queries?\n> > >> On Apr 4, 2015 5:51 PM, \"Alexander Lourier\" <notifications@github.com\n> >\n> > >> wrote:\n> > >>\n> > >> > Now if you ask Prometheus to scrape whole kubernetes.local domain,\n> it\n> > >> will\n> > >> > scrape everything. But you are right - some pods may be scraped\n> > multiple\n> > >> > times.\n> > >> >\n> > >> > For this use case I would provide one more flag to export all pods\n> in\n> > a\n> > >> > separate subdomain.\n> > >> >\n> > >> > With new architecture it's a very easy change.\n> > >> >\n> > >> > On Sat, Apr 4, 2015, 17:15 thockin-cc <notifications@github.com>\n> > wrote:\n> > >> >\n> > >> > > Ahh, I see. That is somewhat unsatisfying. I want to turn\n> prometheus\n> > >> on\n> > >> > > for the whole cluster and have it find ALL pods, not just pods\n> under\n> > >> > > services and not just some services. How do we get there?\n> > >> > >\n> > >> > > Still, DNS-SD might not be so bad for services. Will need to take\n> a\n> > >> look\n> > >> > > at your PR - it is a significant change.\n> > >> > >\n> > >> > > Also, note that pods can slave to multiple services - I am not\n> sure\n> > >> that\n> > >> > > collecting stats twice is what you want..\n> > >> > > On Apr 4, 2015 5:03 PM, \"Alexander Lourier\" <\n> > notifications@github.com\n> > >> >\n> > >> > > wrote:\n> > >> > >\n> > >> > > > It's manually configured by the user. See a config snippet\n> above.\n> > >> Users\n> > >> > > > explicitly list services to monitor.\n> > >> > > >\n> > >> > > > On Sat, Apr 4, 2015, 13:43 Tim Hockin <notifications@github.com\n> >\n> > >> > wrote:\n> > >> > > >\n> > >> > > > > How does Prometheus get the list of services to query?\n> > >> > > > > On Apr 4, 2015 1:26 PM, \"Alexander Lourier\" <\n> > >> > notifications@github.com>\n> > >> > > > > wrote:\n> > >> > > > >\n> > >> > > > > > Service names are just names of the Kubernetes services. For\n> > >> > example,\n> > >> > > > if\n> > >> > > > > > you create service \"foo\", and you have a pod \"bar\" which\n> > matches\n> > >> > > > service\n> > >> > > > > > selector of \"foo\", then you will have DNS name:\n> > >> > > > > > bar.foo.default.kubernetes.local. So service names never\n> > >> conflict\n> > >> > > with\n> > >> > > > > pod\n> > >> > > > > > names. They are subdomains of each other. This allows you to\n> > >> query\n> > >> > > > > > foo.default.kubernetes.local, and get all matching pods.\n> This\n> > is\n> > >> > the\n> > >> > > > core\n> > >> > > > > > idea.\n> > >> > > > > >\n> > >> > > > > > Have a good weekend :)\n> > >> > > > > >\n> > >> > > > > > —\n> > >> > > > > > Reply to this email directly or view it on GitHub\n> > >> > > > > > <\n> > >> > > > >\n> > >> > > >\n> > >> > >\n> > >> > https://github.com/GoogleCloudPlatform/kubernetes/issues/6437#\n> > >> issuecomment-89613287\n> > >> > > > > >\n> > >> > > > > > .\n> > >> > > > > >\n> > >> > > > >\n> > >> > > > > —\n> > >> > > > > Reply to this email directly or view it on GitHub\n> > >> > > > > <\n> > >> > > >\n> > >> > >\n> > >> > https://github.com/GoogleCloudPlatform/kubernetes/issues/6437#\n> > >> issuecomment-89661167\n> > >> > > > >\n> > >> > > > > .\n> > >> > > > >\n> > >> > > >\n> > >> > > > —\n> > >> > > > Reply to this email directly or view it on GitHub\n> > >> > > > <\n> > >> > >\n> > >> > https://github.com/GoogleCloudPlatform/kubernetes/issues/6437#\n> > >> issuecomment-89690682\n> > >> > > >\n> > >> > > > .\n> > >> > > >\n> > >> > >\n> > >> > > —\n> > >> > > Reply to this email directly or view it on GitHub\n> > >> > > <\n> > >> > https://github.com/GoogleCloudPlatform/kubernetes/issues/6437#\n> > >> issuecomment-89692504\n> > >> > >\n> > >> > > .\n> > >> > >\n> > >> >\n> > >> > —\n> > >> > Reply to this email directly or view it on GitHub\n> > >> > <https://github.com/GoogleCloudPlatform/kubernetes/issues/6437#\n> > >> issuecomment-89695143>\n> > >> > .\n> > >> >\n> > >>\n> > >> —\n> > >> Reply to this email directly or view it on GitHub\n> > >> <\n> >\n> https://github.com/GoogleCloudPlatform/kubernetes/issues/6437#issuecomment-89695665\n> > >\n> > >> .\n> > >>\n> > >\n> >\n> > —\n> > Reply to this email directly or view it on GitHub\n> > <\n> https://github.com/GoogleCloudPlatform/kubernetes/issues/6437#issuecomment-89698886\n> >\n> > .\n> >\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/GoogleCloudPlatform/kubernetes/issues/6437#issuecomment-89700142>\n> .\n>\n"}}