Skip to content

Getting started with Network Policy API

1. Install a Network Policy API compatible CNI

There are numerous Container Network Plugin projects that support or are actively working on supporting the Network Policy API. Please refer to the implementations doc for details on the supportability matrix.

2. Install the Network Policy API CRDs

We don't have a released version of the ClusterNetworkPolicy API yet, but you can try out the latest version from the main branch by applying the following manifest:

kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/network-policy-api/refs/heads/main/config/crd/standard/policy.networking.k8s.io_clusternetworkpolicies.yaml

The latest released version of the AdminNetworkPolicy and BaselineAdminNetworkPolicy is v0.1.7. Use the following command to install it in your cluster:

kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/network-policy-api/refs/tags/v0.1.7/config/crd/standard/policy.networking.k8s.io_adminnetworkpolicies.yaml \
-f https://raw.githubusercontent.com/kubernetes-sigs/network-policy-api/refs/tags/v0.1.7/config/crd/standard/policy.networking.k8s.io_baselineadminnetworkpolicies.yaml

3. Try out one of the sample yamls for specific user stories