turbot/kubernetes_compliance

Query: service_type_forbidden

Usage

powerpipe query kubernetes_compliance.query.service_type_forbidden

Steampipe Tables

SQL

select
coalesce(uid, concat(path, ':', start_line)) as resource,
case
when type in ('NodePort', 'LoadBalancer') then 'alarm'
else 'ok'
end as status,
case
when type in ('NodePort', 'LoadBalancer') then 'Containers using ' || name || ' service exposed through ' || type || ' service type.'
else 'Containers using ' || name || ' service not exposed through a forbidden service type.'
end as reason,
coalesce(context_name, '') as context_name,
namespace,
source_type,
coalesce(path || ':' || start_line || '-' || end_line, '') as path
from
kubernetes_service;

Controls

The query is being used by the following controls: