turbot/azure_compliance

Query: kubernetes_cluster_max_pod_50

Usage

powerpipe query azure_compliance.query.kubernetes_cluster_max_pod_50

SQL

with max_node as (
select
distinct id
from
azure_kubernetes_cluster,
jsonb_array_elements(agent_pool_profiles) as p
where
(p ->> 'maxPods') :: int < 50
)
select
c.id as resource,
case
when n.id is not null then 'alarm'
else 'ok'
end as status,
case
when n.id is not null then c.name || ' nodes have less than 50 pods.'
else c.name || ' nodes have greater than 50 pods.'
end as reason,
c.resource_group as resource_group,
sub.display_name as subscription
from
azure_kubernetes_cluster c
left join max_node as n on n.id = c.id,
azure_subscription sub
where
sub.subscription_id = c.subscription_id;

Controls

The query is being used by the following controls: