Add NetworkPolicies to restrict inter-pod communication #33

Open
opened 2026-07-25 19:37:17 +00:00 by lab · 0 comments
Owner

No NetworkPolicy resources exist. Any pod can talk to any other pod across all namespaces.

Policies to create

  1. Allow Caddy → all services (ingress controller needs to reach everything)
  2. Allow CrowdSec LAPI → only from Caddy (bouncer traffic)
  3. Allow databases → only from their consumers (MySQL, PostgreSQL)
  4. Deny all ingress by default in each namespace, then allow specific sources

Steps

  1. Create a default deny-all policy per namespace
  2. Add allow policies for each service pair
  3. Test that Caddy can still reach all backends
  4. Apply via GitOps
No NetworkPolicy resources exist. Any pod can talk to any other pod across all namespaces. ## Policies to create 1. **Allow Caddy → all services** (ingress controller needs to reach everything) 2. **Allow CrowdSec LAPI → only from Caddy** (bouncer traffic) 3. **Allow databases → only from their consumers** (MySQL, PostgreSQL) 4. **Deny all ingress by default** in each namespace, then allow specific sources ## Steps 1. Create a default deny-all policy per namespace 2. Add allow policies for each service pair 3. Test that Caddy can still reach all backends 4. Apply via GitOps
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lab/homelab#33
No description provided.