{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/2585","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/2585/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/2585/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/2585/events","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/issues/2585","id":49954539,"number":2585,"title":"Service reorg for v1beta3","user":{"login":"bgrant0607","id":7725777,"avatar_url":"https://avatars.githubusercontent.com/u/7725777?v=3","gravatar_id":"","url":"https://api.github.com/users/bgrant0607","html_url":"https://github.com/bgrant0607","followers_url":"https://api.github.com/users/bgrant0607/followers","following_url":"https://api.github.com/users/bgrant0607/following{/other_user}","gists_url":"https://api.github.com/users/bgrant0607/gists{/gist_id}","starred_url":"https://api.github.com/users/bgrant0607/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgrant0607/subscriptions","organizations_url":"https://api.github.com/users/bgrant0607/orgs","repos_url":"https://api.github.com/users/bgrant0607/repos","events_url":"https://api.github.com/users/bgrant0607/events{/privacy}","received_events_url":"https://api.github.com/users/bgrant0607/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/api/cluster","name":"api/cluster","color":"e1ed21"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/area/networking","name":"area/networking","color":"006b75"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/area/usability","name":"area/usability","color":"00cc00"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/priority/P1","name":"priority/P1","color":"eb6420"}],"state":"open","locked":false,"assignee":{"login":"bgrant0607","id":7725777,"avatar_url":"https://avatars.githubusercontent.com/u/7725777?v=3","gravatar_id":"","url":"https://api.github.com/users/bgrant0607","html_url":"https://github.com/bgrant0607","followers_url":"https://api.github.com/users/bgrant0607/followers","following_url":"https://api.github.com/users/bgrant0607/following{/other_user}","gists_url":"https://api.github.com/users/bgrant0607/gists{/gist_id}","starred_url":"https://api.github.com/users/bgrant0607/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgrant0607/subscriptions","organizations_url":"https://api.github.com/users/bgrant0607/orgs","repos_url":"https://api.github.com/users/bgrant0607/repos","events_url":"https://api.github.com/users/bgrant0607/events{/privacy}","received_events_url":"https://api.github.com/users/bgrant0607/received_events","type":"User","site_admin":false},"milestone":null,"comments":46,"created_at":"2014-11-24T23:00:20Z","updated_at":"2015-01-23T23:07:23Z","closed_at":null,"body":"Forking from #2358 . Copying verbatim. Will follow with more concrete proposal.\r\n/cc @smarterclayton @thockin @jbeda \r\n\r\nv1beta3 service spec (which is very similar to v1beta1/2):\r\n```\r\ntype ServiceSpec struct {\r\n\tPort int `json:\"port\" yaml:\"port\"`\r\n\tProtocol Protocol `json:\"protocol,omitempty\" yaml:\"protocol,omitempty\"`\r\n\tSelector map[string]string `json:\"selector,omitempty\" yaml:\"selector,omitempty\"`\r\n\tPortalIP string `json:\"portalIP,omitempty\" yaml:\"portalIP,omitempty\"`\r\n\tCreateExternalLoadBalancer bool `json:\"createExternalLoadBalancer,omitempty\" yaml:\"createExternalLoadBalancer,omitempty\"`\r\n\tPublicIPs []string `json:\"publicIPs,omitempty\" yaml:\"publicIPs,omitempty\"`\r\n\tContainerPort util.IntOrString `json:\"containerPort,omitempty\" yaml:\"containerPort,omitempty\"`\r\n}\r\n```\r\n\r\nNaming (DNS and links variables) isn't currently configurable or optional, but should be, for things like non-Kubernetes services or headless services.\r\n\r\nAs discussed in #2319, exposed addresses (PortalIP, PublicIPs) should be unified into a single list from which the system can allocate. We may want to be able to allocate multiple IPs, for DNS load balancing. For headless services, it should also be possible to disable IP allocation. I need to think more about how/whether nominal services (#260) would fit in.\r\n\r\n> DNS name to IP(s)\r\n\r\nAs in #2358, these IPs may even map to non-Kubernetes resources.\r\n\r\n> IPs to endpoints\r\n\r\nThese IPs may be intra-cluster, accessible via tunnels/proxies, externally visible but ephemeral (dynamically allocated for lifetime of the service), or fully externally visible and stable.  #2209 proposed \"every node\" services for an authentication daemon, and we've discussed using magic nonroutable IP addresses like 169.254.169.253 (DNS) and 169.254.169.254 (metadata) for system services.\r\n\r\nWe should support ipv6 as well as ipv4.\r\n\r\n> Pool that the IPs come from\r\n\r\nFor external IP resources, they may or may not map to specific nodes, would have firewall port ranges, and may have other auth policies attached (e.g., who is allowed to use them). Addresses that map to specific nodes will require reserving the specific requested ports from those nodes.\r\n\r\n#2738 proposed multiple IP address \"portals\", where the addresses could be drawn from pools of addresses that were either internally or externally visible. Portal types could be pluggable, like volumes are intended to be.\r\n\r\nIP addresses should be entirely optional in order to support headless services #1607.\r\n\r\nAs per #1802, we should support multiple ports -- a list of (Port, ContainerPort, Protocol) tuples. And, it should be possible to specify no ports and just deal with addresses. Note that it's useful to specify higher-level protocols, such as HTTP/HTTPS, for proxies, UIs, etc.\r\n\r\n> Ports and protocols\r\n\r\nTarget IPs should be specifiable by selector, inline IP and/or name list, and external source, by POSTing/PUTting them to the endpoints API and/or by telling the system to watch an external endpoints API (which I'd like to standardize beyond just K8s).\r\n\r\n> Endpoints defined by selector or other\r\n\r\nI expect in the future that we may want to differentiate the single-target \"routing\" case (e.g., singleton services, master-elected services, nominal services) from the load-balancing case, for at least 2 reasons:\r\n1. Users will want to plug in their own load balancers with more sophisticated/custom policies, either running as pods (e.g., HAProxy, nginx) or as services (either from a cloud provider or otherwise outside k8s)\r\n2. Rather than using a combination of SDN, proxy, and iptables for point-to-point routing, some providers may want pure SDN-based solutions, such as using OVS.\r\n\r\nFor a case where someone plugs in their own load balancer, that would require 2 services with the current approach, I think, one to target the load balancer and another to generate the endpoint list of its targets.\r\n\r\nFWIW, in GCE, this is factored into forwarding rules and target pools/instances, with load balancing configuration associated with the target pool:\r\nhttps://cloud.google.com/compute/docs/load-balancing/network/forwarding-rules\r\n\r\nWith all of the above, is just specifying an external load balancer enough for the case of cloud-provided L3 forwarding and/or balancing? Maybe.\r\n\r\n> L3 load balancing policy\r\n\r\nL7 is #561. L7 balancers (HAProxy, nginx) should be able to consume endpoints and route directly to pod IPs.\r\n\r\nFor reference, OpenShift router: https://github.com/openshift/origin/pull/514\r\n\r\nAs per #620, we need readiness checks, for lots of reasons (rolling updates, auto-scaling, disruptive minion management, ...) in addition to load balancing.\r\n\r\nSticky sessions were requested in #2867 and were added by #2875.\r\n\r\nWe should resolve #983 (port defaulting) in this, also."},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments/71282126","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/issues/2585#issuecomment-71282126","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/2585","id":71282126,"user":{"login":"bgrant0607","id":7725777,"avatar_url":"https://avatars.githubusercontent.com/u/7725777?v=3","gravatar_id":"","url":"https://api.github.com/users/bgrant0607","html_url":"https://github.com/bgrant0607","followers_url":"https://api.github.com/users/bgrant0607/followers","following_url":"https://api.github.com/users/bgrant0607/following{/other_user}","gists_url":"https://api.github.com/users/bgrant0607/gists{/gist_id}","starred_url":"https://api.github.com/users/bgrant0607/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgrant0607/subscriptions","organizations_url":"https://api.github.com/users/bgrant0607/orgs","repos_url":"https://api.github.com/users/bgrant0607/repos","events_url":"https://api.github.com/users/bgrant0607/events{/privacy}","received_events_url":"https://api.github.com/users/bgrant0607/received_events","type":"User","site_admin":false},"created_at":"2015-01-23T23:07:23Z","updated_at":"2015-01-23T23:07:23Z","body":"Ref #2647 for tracking purposes"}}