Control: Kubernetes clusters should use a minimum number of 50 pods
Description
This control checks if Kubernetes clusters is using a minimum number of 50 pods.
Usage
Run the control in your terminal:
powerpipe control run azure_compliance.control.kubernetes_cluster_max_pod_50
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run azure_compliance.control.kubernetes_cluster_max_pod_50 --share
SQL
This control uses a named query:
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 subscriptionfrom azure_kubernetes_cluster c left join max_node as n on n.id = c.id, azure_subscription subwhere sub.subscription_id = c.subscription_id;