More Info:
Network Policies are only enforced when the clusters CNI plugin supports them. Enabling Network Policy in GKE updates the CNI to a policy-capable plugin.Risk Level
MediumAddress
SecurityCompliance Standards
- CIS GKE
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
Confirm GKE Network Policy feature status (per cluster)
- On any machine with
gcloudandkubectlaccess, run: - If
networkPolicy.enabledistrueand a provider is shown (e.g.CALICO), the control plane is configured for Network Policy–capable CNI. Iffalseor empty, Network Policy is not enabled.
- On any machine with
-
Check that NetworkPolicy objects exist and are being used
- On any machine with
kubectlaccess: - If there are no
NetworkPolicyobjects but you expect network isolation, plan to create them; if there are many, note key namespaces/workloads that rely on them.
- On any machine with
-
Validate that policies are enforced as expected (functional test)
- Create a temporary test namespace and pods:
- From
allowed-client, verify it can reach the server before any policy:
- Create a temporary test namespace and pods:
-
Apply a restrictive NetworkPolicy and observe behavior
- Apply a policy that should block the above traffic:
- Test connectivity again; it should now fail:
- If traffic still succeeds, your CNI is not enforcing NetworkPolicies (or another plugin/feature is overriding behavior).
- Apply a policy that should block the above traffic:
-
If Network Policy is not enabled or not enforced, update cluster configuration
- Decide cluster-by-cluster whether you require NetworkPolicy enforcement. For clusters where you do:
- Use GKE Console: Edit the cluster → enable “Network Policy” → save (this may trigger node pool recreation/rolling updates).
- Or via CLI on any machine with
gcloud:
- Plan maintenance windows as this can recreate nodes and briefly disrupt workloads.
- Decide cluster-by-cluster whether you require NetworkPolicy enforcement. For clusters where you do:
-
Re-verify after changes
- After the update completes, repeat steps 1–4 to confirm:
networkPolicy.enabledistruewith a supported provider.- The functional test shows traffic is allowed without policy and blocked with policy.
- Clean up the test namespace when done:
- After the update completes, repeat steps 1–4 to confirm:
Using kubectl
Using kubectl
- If you expect NetworkPolicies to be used and this returns no resources found, then NetworkPolicy is not being used; this may indicate a gap in your design, not in the CNI itself.
- Ensure policies target pods that actually exist (selectors match current pod labels).
- Check
kubectl describefor any events or warnings suggesting policies are not applied as expected.
- You should see an entry like:
networkpolicies networking.k8s.io/v1 true NetworkPolicy
- If there is no line for
networkpolicies, the cluster is misconfigured or very old; NetworkPolicy cannot work regardless of CNI.
- For
gcloud container clusters list, look at:networkPolicy.networkPolicyConfig.disabledfalse→ Network Policy is enabled at the GKE control-plane level.trueor empty → Network Policy is not enabled; even if NetworkPolicy objects exist, they will not be enforced by the CNI.
networkConfig.datapathProvider:ADVANCED_DATAPATHor an equivalent policy-capable provider is expected when Network Policy is enabled.- If Network Policy is disabled and you rely on it for isolation, this is a problem.
- If NetworkPolicy is supported and enforced, you should see:
- Connections that were previously succeeding now failing after the policy is applied, consistent with the policy rules.
- If connections continue to succeed despite a clearly restrictive policy, that strongly suggests:
- The CNI in use is not enforcing NetworkPolicies, or
- Network Policy is not enabled at the GKE cluster level.
- Problem indicated when:
- GKE cluster Network Policy is disabled, yet you rely on NetworkPolicies for pod isolation, or
- Runtime tests show NetworkPolicies have no effect on traffic, despite being created and recognized by the API.
Automation
Automation

