Ansible task to list all pods from any k8s namespace

0 votes
I need an ansible task that lists all pods from any k8s namespace. Can somebody give me an example? Thank you
Jun 11 in Ansible by Tanvi
15 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

This should be pretty simple. Use the k8s_facts module for this purpose. Have a look at the docs to get more details about this module.

- name: list of all pods from namespace
      k8s_facts:
        api_key: "{{ k8s_auth_results.k8s_auth.api_key }}"
        kind: Pod
      register: pod-list
answered Jun 11 by Gred

Related Questions In Ansible

0 votes
1 answer

Ansible: List all installed Apps in RedHat

Try this to get a list of ...READ MORE

answered Jul 13, 2018 in Ansible by ajs3033
• 7,080 points

edited Jul 13, 2018 by ajs3033 45 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17 in Others by anonymous
735 views
+3 votes
1 answer
0 votes
1 answer

Ansible playbbok to copy files from one node to another remote node

You can create a playbook for copying ...READ MORE

answered Jan 16 in Ansible by Danica
85 views
0 votes
1 answer

Ansible playbook for moving files from one node to another remote node

The best way to do this is: copy ...READ MORE

answered Jan 16 in Ansible by Nigya

edited Jan 18 by Vardhan 503 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.