Most Kubernetes clusters start with every pod able to reach every other pod, and on a cloud provider often with every pod able to reach the node’s metadata endpoint. Teams then adopt NetworkPolicy to close their own namespaces, and the platform team tries to use the same resource to enforce the rules that apply to everyone: keep tenants out of the payments namespace, keep pods away from instance credentials, deny by default.

It cannot do that job. NetworkPolicy was designed for application teams to describe what their own pods should accept, and its semantics make a cluster-wide rule impossible to hold. A rule the platform team writes in a namespace can be widened by anyone who can write a policy in that namespace, and that is the same group of people the rule was meant to constrain.

The answer is to stop asking one resource to serve two owners. Cluster-scoped policy, evaluated in tiers, gives the platform a place for the handful of rules that must hold, a place for the default, and leaves the middle to the teams. Google Cloud published a worked example of this on GKE in November 2026, and the reasoning applies to any cluster whose network plugin implements the API.

Why namespace policy cannot hold a guardrail

The Kubernetes documentation is precise about how NetworkPolicy behaves, and three properties together rule it out as a guardrail.

A pod is open in a direction until some policy selects it for that direction. Once selected, it accepts only what the selecting policies allow. Policies have no deny rule, and they do not conflict: the allowed set is the union of everything every applicable policy allows, so the order they are evaluated in cannot change the result.

Put those together and a platform team’s default-deny in a team’s namespace is a starting point, not a rule. The team adds a policy allowing its new client, and the union now includes that client. They add a broad one during an incident, and the union now includes everything. Nothing in the API lets the platform say “and this part may not be widened”. The documentation lists default policies for all namespaces and explicit deny among the things the API cannot do.

An allow-only, additive model has no way to say that a rule may not be overridden.

There is a quieter problem too. Because the policy lives in the namespace, it has to be copied into every namespace, and a namespace created tomorrow starts with nothing. The estate’s security posture becomes a property of whether someone remembered a step in the namespace template.

Three tiers, evaluated top down

ClusterNetworkPolicy is a cluster-scoped resource in its own API group, separate from the namespace-scoped NetworkPolicy. Each policy names a tier and a priority, and each rule takes one of three actions: Accept, Deny or Pass. Evaluation runs from the top tier to the bottom and stops at the first decision.

Tier Written by Evaluated What its decisions mean
Admin Cluster administrators First Final. No namespace policy can override an Accept or Deny here.
NetworkPolicy Application teams Second Ordinary NetworkPolicy, unchanged. Teams keep self-service.
Baseline Cluster administrators Last The default. Teams override it by writing policies above it.
Three tiers, evaluated top down
A connection evaluated through the admin, NetworkPolicy and baseline tiers of cluster network policyA new connection is first evaluated against the admin tier, written by cluster administrators. An Accept or Deny there is final and no namespace policy can change it. Anything the admin tier passes moves down to the NetworkPolicy tier, where ordinary namespace-scoped policies written by application teams can accept it. A connection no team policy decides falls through to the baseline tier, where the cluster default applies: DNS is accepted and everything else is denied unless a team policy above has already allowed it.firstmatchPassallowno matchdefaultNew connectionpod to pod, or pod to networkAdmin tiercluster administratorspriority orderedAccept or Deny, finalmetadata endpoint, restricted namespacesNetworkPolicy tierapplication teamsone namespace eachAcceptedallowed by a team policyBaseline tiercluster administratorsthe defaultDeny, except DNSteams can open it above
API
policy.networking.k8s.io, v1alpha2
Actions
Accept, Deny, Pass
Admin tier
cannot be overridden by any namespace policy
Baseline tier
a default that team policies override
This diagram as text
  • New connection — pod to pod, or pod to network
  • Admin tier — cluster administrators — priority ordered
  • Accept or Deny, final — metadata endpoint, restricted namespaces
  • NetworkPolicy tier — application teams — one namespace each
  • Accepted — allowed by a team policy
  • Baseline tier — cluster administrators — the default
  • Deny, except DNS — teams can open it above

Relationships

  • New connection → Admin tier — first
  • Admin tier → Accept or Deny, final — match
  • Admin tier → NetworkPolicy tier — Pass
  • NetworkPolicy tier → Accepted — allow
  • NetworkPolicy tier → Baseline tier — no match
  • Baseline tier → Deny, except DNS — default
Open full size · after the tier model in Google Cloud's ClusterNetworkPolicy walkthrough

The action that makes this workable is Pass. An admin-tier policy can look at all traffic, decide the few cases it cares about, and hand everything else to the tier below. Without Pass, the admin tier would have to decide every connection or none. With it, the admin tier can be three rules long.

The ownership line follows from the resource itself. Cluster-scoped resources are granted through cluster-level RBAC, so the right to write admin-tier policy can sit with the platform or security team while application teams keep the right to write NetworkPolicy in their own namespaces and nothing more. The conflict that NetworkPolicy left to chance is now settled by the order of evaluation.

What belongs in the admin tier

Very little, and that is the discipline that decides whether the model works. Every admin-tier Deny is a rule a team cannot fix for itself. When one is wrong, it is an outage the team that owns the broken service has no means to resolve.

Google’s two posts give the cases that earn a place:

  • The metadata endpoint. Pods can query the link-local metadata address, 169.254.169.254, and the answer can include instance details and service account tokens. A Deny in the admin tier holds even if a team deploys an allow-all egress policy. Before applying it cluster-wide, find out how your workloads obtain cloud credentials, because some identity integrations serve pod tokens on that same address. Where one does, the rule needs a narrow Accept above it, and both need testing from a pod.
  • Restricted namespaces. A Deny from every tenant namespace into the one holding payment or regulated data overrides any permissive policy a team writes by mistake.
  • Shared platform services. An Accept towards cluster DNS and central services such as authentication and telemetry keeps them reachable however badly a namespace policy is written.

DNS deserves its own mention. A default-deny on egress also blocks DNS, which the Kubernetes documentation warns about explicitly, and Google’s walkthrough carves out port 53 in both its baseline and admin policies before anything else. The walkthrough accepts port 53 to every address to keep the example short. In production, narrow it to the cluster’s DNS service and the resolvers it forwards to. Port 53 open to the whole internet is a path out of the cluster that no other rule will see.

The baseline is a default, and teams will change it

The baseline tier is where the default-deny belongs, applied to every namespace at once. A namespace created tomorrow is closed from its first pod rather than open until someone remembers. Teams then open what their services need with ordinary NetworkPolicy, which is evaluated before the baseline and wins.

That is the intended shape, not a weakness. The baseline is the cluster’s opinion about what should happen when nobody has said otherwise. The admin tier is the cluster’s rules. Keeping those two separate is what lets the platform be strict about a few things and relaxed about the rest.

Applying a baseline deny to a cluster that has run open for a year breaks every flow nobody wrote down, and there are usually more of those than anyone expects. Do it in this order:

  1. Turn on policy verdict logging, so allow and deny decisions are visible. Standard NetworkPolicy has no logging of its own; on GKE, Dataplane V2 exports verdicts to Cloud Logging and streams flows through Hubble.
  2. Collect the flows that actually happen over a full business cycle, including the monthly jobs.
  3. Have each team write the NetworkPolicy for its own namespace from that list.
  4. Apply the admin tier, then the baseline deny, and watch the deny verdicts for the flows the list missed.

What the API does not settle

The tiers solve the ownership problem. They leave several others exactly where they were.

The API is young. It is at v1alpha2, and on GKE it is in preview from version 1.36. Field names can still change between versions. Keep the policies in version control and expect to rewrite them at least once.

Enforcement belongs to the network plugin. A policy resource with no controller implementing it has no effect, and nothing in the API tells you that. On GKE the enforcement is Dataplane V2, which uses eBPF, and Google worked with the Cilium community on Cilium’s implementation of the API. On any other cluster, check that the plugin and version you run support the API before writing a single rule.

Timing is not instant. The Kubernetes documentation notes that a pod created before the plugin has processed a new policy can start unprotected, and that whether a change affects connections already open is left to the implementation. A rule is not proven until a test shows it.

Host-network pods are usually invisible. Most plugins treat traffic from pods on the host network as node traffic, so selectors that match them by label do not apply.

The test that settles all of these is the one Google’s walkthrough builds in: a pod in an untrusted namespace that tries the connections the policies are meant to stop. Run it after every policy change and every cluster upgrade, from the wrong side of each rule.

What to check in a cluster you already run

  • Whether any policy exists at all. A cluster with no policy is fully open in both directions.
  • Whether the default-deny is real. A deny copied into each namespace by a template is undone by any allow in the same namespace, and absent from any namespace the template missed.
  • Whether a pod can reach the metadata endpoint. Try it from an ordinary workload.
  • Where DNS can go. An egress exception for port 53 to any address is an exit.
  • Whether anyone can see a verdict. A policy nobody can observe being enforced is an assumption.

How STP approaches this

We start a cluster review by testing from inside it: a pod in an ordinary namespace tries the metadata endpoint, a restricted namespace and the internet, and the results tell us what the policies really do. Where the network plugin supports tiered cluster policy, we keep the admin tier to the rules that must hold, put the default-deny in the baseline after the flows are known, and leave each team in charge of its own namespace. Where it does not yet, we say so and keep the guardrails where they can actually be enforced.

More on the Kubernetes platform and DevSecOps, or start a conversation.