# K3s Inventory Matrix - Initial Install

**URL:** <https://forums.suse.com/t/k3s-inventory-matrix-initial-install/37100>\
**Category:** General\
**Created:** [February 24, 2022, 8:43pm UTC](https://forums.suse.com/t/k3s-inventory-matrix-initial-install/37100 "2022-02-24T20:43:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bwinchell](https://avatars.discourse-cdn.com/v4/letter/b/c4cdca/32.png) [@bwinchell](https://forums.suse.com/u/bwinchell)\
**Post date:** [February 24, 2022, 8:43pm UTC](https://forums.suse.com/t/k3s-inventory-matrix-initial-install/37100/1 "2022-02-24T20:43:52Z")

</div>

Hello,  
I am newbie to K3s so, this might be a dumb question.

I am working on an Ansible playbook to standup a single node K3s, validate it is operational, & then install a 3rd-party pod.

The issue I am running into is the validate operations. The big questions I have is:

- I need a list of ‘expected’ pods (inventory) prior to deployment. Does this information exists somewhere?
- How do I know all the expected pods have been initialized before continuing with any operation?

Currently, the playbook will:

- deploy the K3s via [https://get.k3s.io](https://get.k3s.io)
- wait for 60 secs
- run the equivalent of 'kubectl get pods -all-namespaces [uses the kubernetes.core module]
- parse the above output for only the pod full names (minus the helm-install-traefik)
  - should result in the following pods
    - local-path-provisioner-{{uid}}
    - coredns-{{uid}}
    - metrics-server-{{uid}}
    - svclb-traefik-{{uid}}
    - traefik-{{uid}}

- loop through the above list and wait for each pod to be in a ‘running’ state

The problem with this solution is:

- No idea how many pods are to be expected
- Without an “inventory matrix”, no way to validate.
  - If I hardcode the names, then any changes to the base install pods will break the workflow.

Solution (if something possible or already exists):

- Read a single file with list each scenario and the associated pods
  - Single node deployment
    - pod#1
    - pod#2
    - pod#3

  - Cluster node deployment
    - All pods of single node
    - pod#4

OR

Have Ansible read any appropriate manifest files to parse the base name of the pod and build the inventory matrix (list).

Any suggestions would be helpful.  
Tx
