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 On Thu, Apr 15, 2021 at 3:31 AM Nick-H <[email protected]> wrote: > 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 > > Le mercredi 14 avril 2021 à 13:09:59 UTC-7, Nick-H a écrit : > >> 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 >> >> >> >> -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/cf20b835-d7af-4c3f-88c1-1f708bdf1888n%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/cf20b835-d7af-4c3f-88c1-1f708bdf1888n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Thanks, Abhijeet Kasurde -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAFwWkHoN-U%2BPVWgX499U5hiKNxbGJoV2ez3M%3DWZcQeNP95%2B80g%40mail.gmail.com.
