Home Explore Blog CI



kubernetes

3rd chunk of `content/en/blog/_posts/2016-04-00-Kubernetes-Network-Policy-APIs.md`
812bc16c500a8277211e7c3153eb6be2194b54c368c831b80000000100000694
Today, Romana, OpenShift, OpenContrail and Calico support network policies applied to namespaces and pods. Cisco and VMware are working on implementations as well. Both Romana and Calico demonstrated these capabilities with Kubernetes 1.2 recently at KubeCon. You can watch their presentations here: [Romana](https://www.youtube.com/watch?v=f-dLKtK6qCs) ([slides](http://www.slideshare.net/RomanaProject/kubecon-london-2016-ronana-cloud-native-sdn)), [Calico](https://www.youtube.com/watch?v=p1zfh4N4SX0) ([slides](http://www.slideshare.net/kubecon/kubecon-eu-2016-secure-cloudnative-networking-with-project-calico)). 



**How does it work?**



Each solution has their their own specific implementation details. Today, they rely on some kind of on-host enforcement mechanism, but future implementations could also be built that apply policy on a hypervisor, or even directly by the network itself. 



External policy control software (specifics vary across implementations) will watch the new API endpoint for pods being created and/or new policies being applied. When an event occurs that requires policy configuration, the listener will recognize the change and a controller will respond by configuring the interface and applying the policy.  The diagram below shows an API listener and policy controller responding to updates by applying a network policy locally via a host agent. The network interface on the pods is configured by a CNI plugin on the host (not shown).



 ![controller.jpg](https://lh5.googleusercontent.com/zMEpLMYmask-B-rYWnbMyGb0M7YusPQFPS6EfpNOSLbkf-cM49V7rTDBpA6k9-Zdh2soMul39rz9rHFJfL-jnEn_mHbpg0E1WlM-wjU-qvQu9KDTQqQ9uBmdaeWynDDNhcT3UjX5)

Title: Network Policy Implementations and Functionality
Summary
Romana, OpenShift, OpenContrail, and Calico support network policies for namespaces and pods, with Cisco and VMware developing implementations. These solutions currently use on-host enforcement mechanisms, but future implementations could apply policies at the hypervisor or network level. External policy control software monitors the API endpoint for pod creation and policy application, triggering a controller to configure the interface and apply the network policy, typically using a host agent and CNI plugin.