k8s_facts just does not work

well another thing I try and just does not work as per the doc
the example from the official doc does not even work :

ansibe 2.8 / python3.6 , openshift / kubernetes pip modules 0.11 (0.12 is broken too).

- name: Search for all running pods
k8s_facts:
kind: Pod
field_selectors:
- status.phase = running

returns:
Failure","message":"field label not supported: status.phase ","reason":"BadRequest","code":400}

Why is that trying to get labels when we are talking fields ?

I am ultimately trying to get infos on Deployments , but same thing field_selectors does not work at all .

anyone been using this module and the field_selectors parameters successfully ?
thanks

well it seems to be limited by k8s api itself , not sure field_selectors is very useful then .
json_query is needed to filter out results from the whole output from facts .
Maybe for now , it s better to use kubectl in the shell module

Hi,

The example is correct. There is no space around = in the field selector and there is ‘R’ is running in your code.

  • k8s_info:
    kind: pod
    field_selectors:
  • status.phase=Running
    register: r