Code change:
return b } <del> // ResourceTypeOrNameArgs indicates that the builder should accept one or two arguments // of the form `(<type1>[,<type2>,...]|<type> <name>)`. When one argument is received, the types // provided will be retrieved from the server (and be comma delimited).  When two arguments are // received, they must be a single type and name. If more than two arguments are provided an // error is set. The allowEmptySelector permits to select all the resources (via Everything func). </del> <ins> // ResourceTypeOrNameArgs indicates that the builder should accept arguments // of the form `(<type1>[,<type2>,...]|<type> <name1>[,<name2>,...])`. When one argument is // received, the types provided will be retrieved from the server (and be comma delimited). // When two or more arguments are received, they must be a single type and resource name(s). // The allowEmptySelector permits to select all the resources (via Everything func). </ins> func (b *Builder) ResourceTypeOrNameArgs(allowEmptySelector bool, args ...string) *Builder { <del> switch len(args) { case 2: b.name = args[1] </del> <ins> switch { case len(args) > 2: b.names = append(b.names, args[1:]...) b.ResourceTypes(SplitResourceArgument(args[0])...) case len(args) == 2: b.names = append(b.names, args[1]) </ins> b.ResourceTypes(SplitResourceArgument(args[0])...) <del> case 1: </del> <ins> case len(args) == 1: </ins> b.ResourceTypes(SplitResourceArgument(args[0])...) if b.selector == nil && allowEmptySelector { b.selector = labels.Everything() } <del> case 0: </del> <ins> case len(args) == 0: </ins> default: b.errs = append(b.errs, fmt.Errorf("when passing arguments, must be resource or resource and name")) }

Related discussion:
text: Currently, it could not delete multiple pods at once, need to delete them one by one, it's very inconvenient if I have tons of pods to delete. Unlike docker, docker can multiple stop/rm containers/images at once.
This is possible using label selectors as of , which is better if you have tons of pods.
I agree that using label selector is better to delete all of pods under the label. But to delete multile pods at once is still usable: I just want to delete 1/2 pods under the label, label selector will not work selector could not span over other selectors or pods Another reason is docker rm/stop x y z works, I will wonder why kubectl cannot. This is not urgent, but I hope it can be implemented.
I agree. Thanks for the suggestion.
Would this be a suitable task for someone new to k8s development? If so, I'd be willing to take a look at this, if someone could provide a couple of hints where to start.
Further to my last message, I have a functional work in progress I would like to share, if anyone is interested?
PRs are welcome. See
Yes, this is a reasonable place to start. Since its in the client, you won't get much orientation to the core server code, but it will be a good place to orient to the client side API. There us also prior art that you can model off of. The kubectl create ... command already supports multiple resources. A good command to adapter would be the 'label' command. You can find it in Many thanks in advance! Brendan On Feb 19, 2015 8:21 AM, "Eric Tune" wrote: