turbot/kubernetes_insights

Query: endpoints_for_node

Usage

powerpipe query kubernetes_insights.query.endpoints_for_node

SQL

select
e.uid as uid
from
kubernetes_node as n,
kubernetes_endpoint as e,
jsonb_array_elements(subsets) as s,
jsonb_array_elements(s -> 'addresses') as a
where
n.name = a ->> 'nodeName'
and e.context_name = n.context_name
and n.uid = $1;