turbot/kubernetes_insights

Query: service_accounts_for_pod

Usage

powerpipe query kubernetes_insights.query.service_accounts_for_pod

SQL

select
distinct s.uid as uid
from
kubernetes_service_account as s,
kubernetes_pod as p
where
p.service_account_name = s.name
and s.context_name = p.context_name
and s.namespace in (select namespace from kubernetes_pod where uid = $1)
and p.uid = $1;