Kubernetes RBAC should have stopped it. It didn’t. The rules were loose, inherited roles were messy, and database access wasn’t tied to the same guardrails. The application connected over the Postgres binary protocol straight to production. No proxy. No audit trail. No control.
This is how it happens. Kubernetes Role-Based Access Control is powerful, but without tight boundaries it turns into a patchwork of ClusterRoles, RoleBindings, and service account permissions that no one fully understands. For database-heavy workloads, gaps grow wider. If a pod can connect to Postgres over the binary protocol, it bypasses application-layer controls. That means engineers, jobs, or even compromised containers can execute high-privilege SQL without triggering your intended security checks.
The fix is not theory. Lock down RBAC so that only trusted service accounts can talk to a database. Bind these accounts to minimal roles. Enforce namespace isolation. Pair this with a proxy that terminates the Postgres binary protocol before it reaches the cluster network. The proxy becomes a gate: you can require authentication, authorization, and logging there, every time.