# In a preflight/support bundle collector, can I see if there are any pods that match a label?

**URL:** https://community.replicated.com/t/in-a-preflight-support-bundle-collector-can-i-see-if-there-are-any-pods-that-match-a-label/984
**Category:** How do I?
**Tags:** support-bundle, pre-flights
**Created:** [September 22, 2022, 3:36pm UTC](https://community.replicated.com/t/in-a-preflight-support-bundle-collector-can-i-see-if-there-are-any-pods-that-match-a-label/984 "2022-09-22T15:36:59Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![MrSimonEmms](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.replicated.com/mrsimonemms/32/507_2.png) [@MrSimonEmms](https://community.replicated.com/u/MrSimonEmms)
#### Post date: [September 22, 2022, 3:36pm UTC](https://community.replicated.com/t/in-a-preflight-support-bundle-collector-can-i-see-if-there-are-any-pods-that-match-a-label/984/1 "2022-09-22T15:36:59Z")

</div>

I’d like to create a preflight check that alerts users if one-or-more pod exist with the label `component=workspace`. I don’t care about the exact number, just so long as it’s greater than one.

My initial thought was to use Cluster Resources and then search in `/cluster-resources/pods/<name>.json` and then use the JSON compare - however, I can’t see how I can do a `jq` command in there.

I don’t believe I can use the deployment status analyzer as this is a pod that’s created directly (ie, not with a parent deployment/daemonset/statefulset).

I could use a regex command, although that runs the risk of the `"component": "workspace"` not being in the `labels` (that’s a very low chance, but not zero)

---

<div class="post-metadata">

### Author: ![dex](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.replicated.com/dex/32/26_2.png) [@dex](https://community.replicated.com/u/dex)
#### Post date: [September 28, 2022, 3:02am UTC](https://community.replicated.com/t/in-a-preflight-support-bundle-collector-can-i-see-if-there-are-any-pods-that-match-a-label/984/2 "2022-09-28T03:02:39Z")

</div>

not directly related but maybe an interesting conversation to incorporate here [Ability to display informational values from a JSON file or jq query · Issue #731 · replicatedhq/troubleshoot · GitHub](https://github.com/replicatedhq/troubleshoot/issues/731)
