turbot/kubernetes_insights

Query: statefulsets_for_pod

Usage

powerpipe query kubernetes_insights.query.statefulsets_for_pod

SQL

select
s.uid as uid
from
kubernetes_stateful_set as s,
kubernetes_pod as p,
jsonb_array_elements(p.owner_references) as pod_owner
where
pod_owner ->> 'uid' = s.uid
and s.context_name = p.context_name
and p.uid = $1;