{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/13488","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/13488/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/13488/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/13488/events","html_url":"https://github.com/kubernetes/kubernetes/issues/13488","id":104387588,"number":13488,"title":"Rolling restart of pods belonging to a replication controller","user":{"login":"ghodss","id":5209643,"avatar_url":"https://avatars.githubusercontent.com/u/5209643?v=3","gravatar_id":"","url":"https://api.github.com/users/ghodss","html_url":"https://github.com/ghodss","followers_url":"https://api.github.com/users/ghodss/followers","following_url":"https://api.github.com/users/ghodss/following{/other_user}","gists_url":"https://api.github.com/users/ghodss/gists{/gist_id}","starred_url":"https://api.github.com/users/ghodss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghodss/subscriptions","organizations_url":"https://api.github.com/users/ghodss/orgs","repos_url":"https://api.github.com/users/ghodss/repos","events_url":"https://api.github.com/users/ghodss/events{/privacy}","received_events_url":"https://api.github.com/users/ghodss/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/area/app-config-deployment","name":"area/app-config-deployment","color":"fb6420"},{"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/priority/P2","name":"priority/P2","color":"fbca04"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/team/ux","name":"team/ux","color":"d2b48c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-09-02T01:48:33Z","updated_at":"2016-05-10T09:19:04Z","closed_at":null,"body":"`kubectl rolling-update` is useful for incrementally deploying a new replication controller. But if you have an existing replication controller and want to do a rolling restart of all the pods that it manages, you are forced to do a no-op update to an RC with a new name and the same spec. It would be useful to be able to do a rolling restart without needing to change the RC or to give the RC spec, so anyone with access to kubectl could easily initiate a restart without worrying about having the spec locally, making sure it's the same/up to date, etc. This could work in a few different ways:\r\n\r\n1. A new command, `kubectl rolling-restart` that takes an RC name and incrementally deletes all the pods controlled by the RC and allows the RC to recreate them.\r\n1. Same as 1, but instead of deleting each pod, the command iterates through the pods and issues some kind of \"restart\" command to each pod incrementally (does this exist? is this a pattern we prefer?). The advantage of this one is that the pods wouldn't get unnecessarily rebalanced to other machines.\r\n1. `kubectl rolling-update` with a flag that lets you specify an old RC only, and it follows the logic of either 1 or 2.\r\n1. `kubectl rolling-update` with a flag that lets you specify an old RC only, and it auto-generates a new RC based on the old one and proceeds with normal rolling update logic.\r\n\r\nAll of the above options would need the MaxSurge and MaxUnavailable options recently introduced (see #11942) along with readiness checks along the way to make sure that the restarting is done without taking down all the pods.\r\n\r\n@nikhiljindal @kubernetes/kubectl "},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/218103521","html_url":"https://github.com/kubernetes/kubernetes/issues/13488#issuecomment-218103521","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/13488","id":218103521,"user":{"login":"paunin","id":500074,"avatar_url":"https://avatars.githubusercontent.com/u/500074?v=3","gravatar_id":"","url":"https://api.github.com/users/paunin","html_url":"https://github.com/paunin","followers_url":"https://api.github.com/users/paunin/followers","following_url":"https://api.github.com/users/paunin/following{/other_user}","gists_url":"https://api.github.com/users/paunin/gists{/gist_id}","starred_url":"https://api.github.com/users/paunin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paunin/subscriptions","organizations_url":"https://api.github.com/users/paunin/orgs","repos_url":"https://api.github.com/users/paunin/repos","events_url":"https://api.github.com/users/paunin/events{/privacy}","received_events_url":"https://api.github.com/users/paunin/received_events","type":"User","site_admin":false},"created_at":"2016-05-10T09:19:04Z","updated_at":"2016-05-10T09:19:04Z","body":"Small work around (I use deployments and I want to change configs without having real changes in image/pod):\r\n* create configMap\r\n* create deployment with ENV variable (you will use it as indicator for your deployment) in any container\r\n* update configMap\r\n* update deployment (change this ENV variable)\r\n\r\nk8s will see that definition of deployment has been changed ad will start process of replacing pods\r\nPS:\r\nif someone have better solution please share"}}