turbot/kubernetes_insights

Query: jobs_for_pod

Usage

powerpipe query kubernetes_insights.query.jobs_for_pod

SQL

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