kubectl filter doesn't work with jobs?

7/13/2016

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.

-- Jeremy Lewi
google-kubernetes-engine
kubernetes

1 Answer

7/14/2016

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

-- Eric Tune
Source: StackOverflow