{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24533","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24533/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24533/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24533/events","html_url":"https://github.com/kubernetes/kubernetes/issues/24533","id":149809903,"number":24533,"title":"`kubectl run --restart=Never` restarts (creates a Job)","user":{"login":"thockin","id":5595220,"avatar_url":"https://avatars.githubusercontent.com/u/5595220?v=3","gravatar_id":"","url":"https://api.github.com/users/thockin","html_url":"https://github.com/thockin","followers_url":"https://api.github.com/users/thockin/followers","following_url":"https://api.github.com/users/thockin/following{/other_user}","gists_url":"https://api.github.com/users/thockin/gists{/gist_id}","starred_url":"https://api.github.com/users/thockin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thockin/subscriptions","organizations_url":"https://api.github.com/users/thockin/orgs","repos_url":"https://api.github.com/users/thockin/repos","events_url":"https://api.github.com/users/thockin/events{/privacy}","received_events_url":"https://api.github.com/users/thockin/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/help-wanted","name":"help-wanted","color":"006b75"},{"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":{"url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/18","html_url":"https://github.com/kubernetes/kubernetes/milestones/v1.3","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/18/labels","id":1638460,"number":18,"title":"v1.3","description":"https://github.com/kubernetes/kubernetes/wiki/Release-1.3","creator":{"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},"open_issues":158,"closed_issues":27,"state":"open","created_at":"2016-03-11T07:40:20Z","updated_at":"2016-04-27T07:26:22Z","due_on":"2016-06-24T07:00:00Z","closed_at":null},"comments":21,"created_at":"2016-04-20T15:51:45Z","updated_at":"2016-04-27T08:18:51Z","closed_at":null,"body":"What do we think should happen here:\r\n```\r\nkubectl run should-run-once --image=busybox --restart=Never -- exit 1\r\n```\r\n\r\nI would expect this to run once and then never retry.  What happens is that we create a Job with a PodTemplate that says `restartPolicy: Never` and then the Job itself happily restarts the Pod (well, recreates it).  So it appears we no longer have a way to express \"really, just run once\" through `kubectl run`?  That doesn't seem right - I feel like I am missing something...\r\n\r\n@erictune @janetkuo \r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/215007890","html_url":"https://github.com/kubernetes/kubernetes/issues/24533#issuecomment-215007890","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24533","id":215007890,"user":{"login":"kargakis","id":3900799,"avatar_url":"https://avatars.githubusercontent.com/u/3900799?v=3","gravatar_id":"","url":"https://api.github.com/users/kargakis","html_url":"https://github.com/kargakis","followers_url":"https://api.github.com/users/kargakis/followers","following_url":"https://api.github.com/users/kargakis/following{/other_user}","gists_url":"https://api.github.com/users/kargakis/gists{/gist_id}","starred_url":"https://api.github.com/users/kargakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kargakis/subscriptions","organizations_url":"https://api.github.com/users/kargakis/orgs","repos_url":"https://api.github.com/users/kargakis/repos","events_url":"https://api.github.com/users/kargakis/events{/privacy}","received_events_url":"https://api.github.com/users/kargakis/received_events","type":"User","site_admin":false},"created_at":"2016-04-27T08:18:50Z","updated_at":"2016-04-27T08:18:50Z","body":"Agreed with @erictune / @janetkuo \r\n```\r\nkubectl run --restart=Always # creates a Deployment\r\nkubectl run --restart=Never # creates bare pod\r\nkubectl run --restart=OnFailure # creates a Job.\r\n```"}}