{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/19873","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/19873/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/19873/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/19873/events","html_url":"https://github.com/kubernetes/kubernetes/issues/19873","id":127741206,"number":19873,"title":"kubectl logs -l ","user":{"login":"erictune","id":8105590,"avatar_url":"https://avatars.githubusercontent.com/u/8105590?v=3","gravatar_id":"","url":"https://api.github.com/users/erictune","html_url":"https://github.com/erictune","followers_url":"https://api.github.com/users/erictune/followers","following_url":"https://api.github.com/users/erictune/following{/other_user}","gists_url":"https://api.github.com/users/erictune/gists{/gist_id}","starred_url":"https://api.github.com/users/erictune/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erictune/subscriptions","organizations_url":"https://api.github.com/users/erictune/orgs","repos_url":"https://api.github.com/users/erictune/repos","events_url":"https://api.github.com/users/erictune/events{/privacy}","received_events_url":"https://api.github.com/users/erictune/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":null,"comments":1,"created_at":"2016-01-20T17:36:23Z","updated_at":"2016-01-22T07:55:13Z","closed_at":null,"body":"When I run a job, I want to check on the progress being made by the pods.   Likewise with an RC (either directly created or via `kubectl run`.\r\n\r\nFor listing the pods, I use the `-l` option, like this:\r\n```console\r\nkubectl run foo --image bar -- /bin/blorp\r\nkubectl get pods -l run=myrunname\r\n```\r\n\r\nBut, usually the next thing I want to do is check logs.\r\nI want to be able to do this:\r\n```\r\nkubectl get pods -l run=myrunname\r\n```\r\nThat doesn't work.  This is a request to implement it.\r\n\r\nSomething like this:\r\n\r\n1. when -l option passed to `logs`, get a list of matching pods\r\n1. for each pod name, get its logs.\r\n1. print some kind of separator between logs from multiple pods.\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/173837412","html_url":"https://github.com/kubernetes/kubernetes/issues/19873#issuecomment-173837412","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/19873","id":173837412,"user":{"login":"AdoHe","id":1555564,"avatar_url":"https://avatars.githubusercontent.com/u/1555564?v=3","gravatar_id":"","url":"https://api.github.com/users/AdoHe","html_url":"https://github.com/AdoHe","followers_url":"https://api.github.com/users/AdoHe/followers","following_url":"https://api.github.com/users/AdoHe/following{/other_user}","gists_url":"https://api.github.com/users/AdoHe/gists{/gist_id}","starred_url":"https://api.github.com/users/AdoHe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdoHe/subscriptions","organizations_url":"https://api.github.com/users/AdoHe/orgs","repos_url":"https://api.github.com/users/AdoHe/repos","events_url":"https://api.github.com/users/AdoHe/events{/privacy}","received_events_url":"https://api.github.com/users/AdoHe/received_events","type":"User","site_admin":false},"created_at":"2016-01-22T07:55:12Z","updated_at":"2016-01-22T07:55:12Z","body":"@erictune in `kubectl get pods -l run=myrunname` command, `-l` means <b>label select</b>, so you mean that we should add a `-l` option to `logs` subCommand, thus we can check on the progress being made by the pods when run a job?"}}