{"action":"opened","issue":{"url":"https://api.github.com/repos/coreos/kube-aws/issues/170","repository_url":"https://api.github.com/repos/coreos/kube-aws","labels_url":"https://api.github.com/repos/coreos/kube-aws/issues/170/labels{/name}","comments_url":"https://api.github.com/repos/coreos/kube-aws/issues/170/comments","events_url":"https://api.github.com/repos/coreos/kube-aws/issues/170/events","html_url":"https://github.com/coreos/kube-aws/issues/170","id":195974670,"number":170,"title":"Label nodes accordingly to their roles","user":{"login":"mumoshu","id":22009,"avatar_url":"https://avatars.githubusercontent.com/u/22009?v=3","gravatar_id":"","url":"https://api.github.com/users/mumoshu","html_url":"https://github.com/mumoshu","followers_url":"https://api.github.com/users/mumoshu/followers","following_url":"https://api.github.com/users/mumoshu/following{/other_user}","gists_url":"https://api.github.com/users/mumoshu/gists{/gist_id}","starred_url":"https://api.github.com/users/mumoshu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mumoshu/subscriptions","organizations_url":"https://api.github.com/users/mumoshu/orgs","repos_url":"https://api.github.com/users/mumoshu/repos","events_url":"https://api.github.com/users/mumoshu/events{/privacy}","received_events_url":"https://api.github.com/users/mumoshu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-16T03:43:17Z","updated_at":"2016-12-16T03:43:17Z","closed_at":null,"body":"#147 introduced the `node.alpha.kubernetes.io/role=master` taint to restrict scheduling on controller nodes. It indeed support some use-cases like \"dedicated nodes\".\r\n\r\nHowever,\r\n\r\n* There's currently no way to schedule pods only to controllers\r\n  * For example, adding a toleration to cancel the `node.alpha.kubernetes.io/role=master` doesn't mean pods are scheduled **only** to controller nodes but rather they **(are preferred to|can also) be scheduled to** controller nodes.\r\n* There's currently no out of box way to query just worker nodes for e.g. administrative purpose\r\n  * `kubelctl get no`, of course, shows all the nodes including controller and worker nodes.\r\n  * `kubectl get no --selector \"<appropriate label>\"` could be used to query just worker nodes.\r\n     * There's currently no well-known label assigned by default, though\r\n\r\nI'd suggest:\r\n\r\n* `kube-aws.coreos.com/role=master` for controller nodes\r\n* `kube-aws.coreos.com/role=worker` for worker nodes\r\n   * FYI, GKE seems to label worker nodes with `role=worker` by default\r\n      * I'd rather like it namespaced after reading [an upstream issue regarding taints](https://github.com/kubernetes/kubernetes/issues/36272)\r\n\r\nI'm not willing to use a namespace like `node.alpha.kubernetes.io` right now because I believe doing so can collide with **official** labels used widely among various kubernetes deployments in the future.\r\n\r\nAlso note that you can achieve this today for workers by editing `cluster.yaml`:\r\n\r\n```\r\nexperimental:\r\n  nodeLabels:\r\n    kube-aws.coreos.com/role: worker\r\n```\r\n"}}
{"actor":{"display_login":"mumoshu"}}