COLLEGE PROJECT ยท 2024
SDN controller
Zero-trust, intent-based network security for Kubernetes workloads. Eight services run in Docker Compose.
- Plain code
- A model
- A check
- An outside part
- One request
- One source of truth
A FastAPI policy API is the source of truth. Pydantic validates policies and PostgreSQL stores them.
- Two controllers, one master
Two Ryu OpenFlow controllers run as a high-availability pair. ZooKeeper leader election picks one master.
- Watch, then reconcile
Watchers follow Kubernetes pod events and database policy changes. The controller reconciles flows.
- Block rules, marked by a cookie
DROP rules go between source and destination sets. A cookie purges them without touching baseline flows.
- A closed loop
An IsolationForest model flags anomalies on synthetic traffic and posts a block policy to the API.
- SETTING
- College project, 2024
- STACK
- Python, FastAPI, PostgreSQL, Ryu, ZooKeeper, scikit-learn
- OBSERVABILITY
- Prometheus, Grafana, an sFlow packet counter
- CODE
- Code on GitHub
KEY
- Plain code
- A model
- A check
- An outside part
- One request
Only one tower is filled in, because only one controller is master at a time.