{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/34394","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/34394/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/34394/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/34394/events","html_url":"https://github.com/kubernetes/kubernetes/issues/34394","id":181817286,"number":34394,"title":"ExternalName type service cannot be created if without `spec.ports`. ","user":{"login":"chengzhang1016","id":18393357,"avatar_url":"https://avatars.githubusercontent.com/u/18393357?v=3","gravatar_id":"","url":"https://api.github.com/users/chengzhang1016","html_url":"https://github.com/chengzhang1016","followers_url":"https://api.github.com/users/chengzhang1016/followers","following_url":"https://api.github.com/users/chengzhang1016/following{/other_user}","gists_url":"https://api.github.com/users/chengzhang1016/gists{/gist_id}","starred_url":"https://api.github.com/users/chengzhang1016/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chengzhang1016/subscriptions","organizations_url":"https://api.github.com/users/chengzhang1016/orgs","repos_url":"https://api.github.com/users/chengzhang1016/repos","events_url":"https://api.github.com/users/chengzhang1016/events{/privacy}","received_events_url":"https://api.github.com/users/chengzhang1016/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/component/kubectl","name":"component/kubectl","color":"0052cc"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/team/cluster","name":"team/cluster","color":"d2b48c"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-10-08T10:01:08Z","updated_at":"2016-10-25T01:52:46Z","closed_at":null,"body":"**What keywords did you search in Kubernetes issues before filing this one?** (If you have found any duplicates, you should instead reply there.): external service\r\n\r\n**Kubernetes version** (use `kubectl version`):\r\nv1.5.0-alpha.0.2084+162d80eced3989\r\n\r\n**What happened**:\r\nExternalName type service cannot be created if without `spec.ports`. \r\n\r\n**How to reproduce it** (as minimally and precisely as possible):\r\nCreate a ExternalName type service: `kubectl create -f ExternalName type service`\r\n\r\n```\r\n{\r\n    \"kind\": \"Service\",\r\n    \"apiVersion\": \"v1\",\r\n    \"metadata\": {\r\n        \"name\": \"my-service\"\r\n    },\r\n    \"spec\": {\r\n        \"type\": \"ExternalName\",\r\n        \"externalName\": \"my.database.example.com\"\r\n    }\r\n}\r\n```\r\n\r\n\r\n**Actual results**:\r\nExternalName type service created failed.\r\n```\r\n# kubectl create -f externalname-service.json\r\nerror: error validating \"externalname-service.json\": error validating data: field ports: is required; if you choose to ignore these errors, turn validation off with --validate=false\r\n```\r\n\r\n**Expected results**: \r\nService should be created successful.\r\n\r\n**Anything else do we need to know**:\r\nYou can refer to the docs about externalname type service: https://github.com/kubernetes/kubernetes.github.io/blob/release-1.4/docs/user-guide/services/index.md\r\nThe docs indicated that `An ExternalName service is a special case of service that does not have selectors. It does not define any ports or endpoints. Rather, it serves as a way to return an alias to an external service residing outside the cluster.`"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/255914622","html_url":"https://github.com/kubernetes/kubernetes/issues/34394#issuecomment-255914622","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/34394","id":255914622,"user":{"login":"chengzhang1016","id":18393357,"avatar_url":"https://avatars.githubusercontent.com/u/18393357?v=3","gravatar_id":"","url":"https://api.github.com/users/chengzhang1016","html_url":"https://github.com/chengzhang1016","followers_url":"https://api.github.com/users/chengzhang1016/followers","following_url":"https://api.github.com/users/chengzhang1016/following{/other_user}","gists_url":"https://api.github.com/users/chengzhang1016/gists{/gist_id}","starred_url":"https://api.github.com/users/chengzhang1016/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chengzhang1016/subscriptions","organizations_url":"https://api.github.com/users/chengzhang1016/orgs","repos_url":"https://api.github.com/users/chengzhang1016/repos","events_url":"https://api.github.com/users/chengzhang1016/events{/privacy}","received_events_url":"https://api.github.com/users/chengzhang1016/received_events","type":"User","site_admin":false},"created_at":"2016-10-25T01:52:46Z","updated_at":"2016-10-25T01:52:46Z","body":"@thaniyarasu No. My means is that ExternalName type service cannot be created if without `spec.ports`.\r\nYou can try again via your josn without `\"ports\": [{ \"port\": 3000 }]`\r\n\r\nYou can refer to the docs about externalname type service: https://github.com/kubernetes/kubernetes.github.io/blob/release-1.4/docs/user-guide/services/index.md\r\nThe docs indicated that `An ExternalName service is a special case of service that does not have selectors. It does not define any ports or endpoints. Rather, it serves as a way to return an alias to an external service residing outside the cluster.`"}}
{"actor":{"display_login":"chengzhang1016"}}