Jeremy Lewi
Jeremy Lewi

Reputation: 6766

kubectl filter doesn't work with jobs?

I'm trying to delete jobs using a filter like the following

kubectl delete jobs -l ml=""

This returns no resources found. However if I do kubectl describe I see

Labels:     ml=,job_type=worker,runtime_id=tf-runtime,task_index=0

The same filter and command works just fine with the pods created by the job controller.

The command also works just fine my job is tagged with a single label, for example

Labels:     ml=

So my filter appears to be incorrect when there are other labels on the resource. However, the same set of labels on other resources (services, pods) works just fine with that filter.

Upvotes: 0

Views: 446

Answers (1)

Eric Tune
Eric Tune

Reputation: 8228

I just tried this with with kubectl 1.3.0 and I can't reproduce it. Can you try the latest kubectl?

Upvotes: 1

Related Questions