<p>I use config connector <a href="https://cloud.google.com/config-connector/docs/overview" rel="nofollow noreferrer">https://cloud.google.com/config-connector/docs/overview</a></p>
<p>I create gcp resources with CRDs that config connector provides:</p>
<pre><code>kind: IAMServiceAccount
kind: StorageBucket
etc
</code></pre>
<p>Now what I'd really like is to be able to get a simple list of each resource and its status (if it was created successfully or not). Where each resource is a single line that's something like: <code>kind, name, status, etc</code></p>
<p>Is there a way with kubectl to get a list of all resources that were created by an operator like this? I suppose I could manually label all these resources and try to select with a label but I really don't want to do that</p>
<h2>Edit</h2>
<p>Per the comment I could do this, but curious if there is a less unwieldy command</p>
<pre><code>kubectl get crds --selector cnrm.cloud.google.com/managed-by-kcc=true \
    -o=jsonpath='{range .items[*]}{.metadata.name}{&quot;\n&quot;}{end}' | xargs -n 1 \
    kubectl get -Ao jsonpath='{range .items[*]}{&quot; Kind: &quot;}{@.kind}{&quot;Name: &quot;}{@.metadata.name}{&quot; Status: &quot;}{@.status.conditions[].status}{&quot; Reason: &quot;}{@.status.conditions[].reason}{&quot;\n&quot;}{end}' --ignore-not-found
</code></pre>

red888
<p>There is also a way suggested in GCP config-connector docs:</p>
<pre><code>kubectl get gcp
</code></pre>
<p>from <a href="https://cloud.google.com/config-connector/docs/how-to/monitoring-your-resources#listing_all_resources" rel="nofollow noreferrer">https://cloud.google.com/config-connector/docs/how-to/monitoring-your-resources#listing_all_resources</a></p>
