# Network Segmentation

> Control pod-to-pod communication using Network Policies

- **Category**: Cloud
- **Subcategory**: Security
- **Canonical URL**: https://designpattern.fyi/patterns/k8s_network_segmentation/

---

## Description
The Network Segmentation pattern controls pod-to-pod communication using Kubernetes Network Policies. Network policies define which pods can communicate with each other and with external networks. This implements zero-trust networking principles and limits potential attack paths within the cluster.


## Use Cases
Use when you need to control network traffic between pods or when you want to implement zero-trust networking in your cluster.





## Trade-offs


### Advantages

- Implements zero-trust networking

- Limits attack paths

- Fine-grained network control

- Improves cluster security posture




### Considerations & Drawbacks

- Requires network plugin support

- Can be complex to configure

- May break existing communications







---
**Reference**: [Original Source](https://github.com/k8spatterns/examples/tree/master/security/NetworkSegmentation)

