Skip to main content
How a Platform Team Cut Policy Sprawl by 60% with Unified Kubernetes GovernanceStandards
5 min readFor Compliance Teams

How a Platform Team Cut Policy Sprawl by 60% with Unified Kubernetes Governance

The Challenge

Your platform engineering team might be managing multiple Kubernetes clusters across various environments. A common issue is policy chaos. One team adopted Kyverno as their policy engine, deploying ClusterPolicy resources for cluster-wide rules and namespaced Policy resources for team-specific constraints. While the policies enforced pod security standards and blocked privileged containers, the team lacked visibility into their effectiveness.

Key questions went unanswered: Which policies were blocking deployments? Which teams frequently hit violations? Were development clusters enforcing different standards than production? The team had built Kyverno policies but couldn't monitor their behavior across the infrastructure. Their dashboard showed cluster health and application metrics, but policy enforcement was a blind spot.

The issue became critical during an incident review. A developer deployed a container without resource limits to production, causing a node to run out of memory and crash neighboring applications. The Kyverno policy to prevent this was only active in staging clusters, unnoticed until the outage.

The Environment and Constraints

Several constraints shaped the team's approach:

Multi-tenancy requirements: Twenty-three application teams shared the Kubernetes infrastructure. Each team needed different policy boundaries. Some handled PCI DSS workloads requiring strict network policies, while others ran internal tools with looser constraints. The platform team needed to enforce baseline standards everywhere while allowing team-specific policies without conflicts.

Hybrid policy architecture: The team used both ClusterPolicy resources for organization-wide rules and namespaced Policy resources for team-specific requirements. This hybrid approach allowed team autonomy while maintaining guardrails, but made policy auditing difficult without proper tools.

Cost pressure on GPU workloads: Three teams ran machine learning jobs on GPU-enabled nodes. The platform team provisioned NVIDIA A100 instances at $3.67 per hour per GPU but lacked visibility into GPU utilization. Finance wanted to know if they were paying for idle GPU capacity, but existing metrics only tracked CPU and memory.

Compliance audit schedule: An ISO/IEC 27001:2022 audit was scheduled in eight weeks. Auditors would ask for evidence that security policies were consistently enforced across all environments. The team needed to demonstrate that policies were active, effective, and consistently applied.

The Approach Taken

The team evaluated options for gaining policy visibility. Building custom tooling would take months. They considered open-source policy reporting tools, but most required running additional agents in each cluster and didn't integrate with existing infrastructure monitoring.

They adopted Fairwinds Insights for its enhanced Kyverno integration, supporting multiple Kyverno policy types. This provided a unified view of all policies, regardless of scope or cluster location. Implementation took three days. They deployed the Insights agent to each cluster using their existing Helm deployment pipeline. The agent discovered all Kyverno policies and reported violations, policy status, and enforcement patterns to a central dashboard.

For GPU visibility, they enabled the GPU metrics feature in Alpha mode, providing per-pod GPU utilization data alongside existing CPU and memory metrics. This allowed them to see which ML training jobs were using the expensive GPU nodes and which were underutilized.

Results and Metrics

The unified policy view revealed gaps. The team found that 11 of their 47 clusters were missing critical ClusterPolicy resources. In staging environments, policy enforcement was inconsistent. The dashboard showed that 60% of policy violations were concentrated in three namespaces, all belonging to the same application team.

Within two weeks, they:

  • Standardized ClusterPolicy deployment across all 47 clusters
  • Identified and removed 23 duplicate or conflicting Policy resources
  • Reduced their total policy count from 156 to 62 by consolidating overlapping rules
  • Established a weekly review process to examine top policy violations and address root causes

The GPU metrics showed that two of the three ML teams were running training jobs using less than 40% of available GPU capacity. The platform team worked with those teams to right-size their GPU requests, reducing their GPU node count from 12 to 8 instances, saving approximately $10,600 monthly.

For the ISO/IEC 27001:2022 audit, they generated policy enforcement reports showing consistent application of security controls. Auditors accepted these reports as evidence of effective policy management, eliminating a previous audit finding.

Lessons Learned

The platform team identified several lessons:

Start with policy inventory, not policy creation: Deploy monitoring alongside the first policies. You can't improve what you can't measure, and policy effectiveness is no exception.

Treat Alpha features as learning opportunities: The GPU metrics feature provided valuable data, but being in Alpha meant occasional data gaps. Communicate clearly to teams that Alpha features will evolve.

Define policy ownership before scaling: Several ClusterPolicy resources lacked ownership. Now, every policy requires an owner annotation and documented purpose.

Integrate policy violations into existing workflows: Initially, policy violations were unaddressed because teams didn't see them in their normal workflow. Integrate policy violation notifications into Slack and ticketing systems.

Takeaways for Your Team

If you're managing Kubernetes policies at scale, consider these practices:

Audit before you standardize: Deploy visibility tooling first, then use the data to inform which policies matter. Avoid enforcing policies that catch zero violations while missing critical ones.

Match policy scope to policy purpose: Use ClusterPolicy for security baselines that apply everywhere. Use namespaced Policy resources for team-specific constraints. Avoid complex, unmaintainable policies.

Track GPU utilization before scaling GPU infrastructure: For AI/ML workloads, instrument GPU metrics early. Right-sizing GPU allocation requires data, not guesswork.

Build policy review into your sprint cycle: Policy effectiveness degrades over time. A weekly review process catches drift before it becomes a compliance issue.

Document policy intent, not just policy rules: Every policy should include annotations explaining its purpose. If you can't explain why a policy exists, you probably don't need it.

The shift from "we have policies" to "we understand our policies" transformed how this team operates. They moved from reactive policy management to proactive policy optimization based on actual violation patterns. That's the difference between policy theater and effective governance.

Topics:Standards

You Might Also Like