
OPA & kube-mgmt Deep Dive
Introduction When we talk about "policy management" in the Kubernetes world, OPA (Open Policy Agent) is the first thing that comes to mind. However, OPA itself is beautifully simple. In a nutshell, it's just "a function that takes JSON as input and returns JSON as output." Input : Data like "User A wants to buy Item B" Rule : Logic like "If there is inventory, allow it" (written in Rego) Output : "Allow" or "Deny" OPA isn't exclusive to Kubernetes. You can use it for Linux, SSH, or your own custom applications. This is because OPA knows absolutely nothing about the current state of the world (like what's happening inside Kubernetes). Enter the star of the show: kube-mgmt . This is the "dedicated runner (Sidecar)" that tirelessly fetches information from the Kubernetes world and feeds it to the isolated, oblivious OPA. In this article, we'll take a massive, 500+ line deep dive into this incredibly versatile pattern—often overshadowed by Gatekeeper—exploring its internal implementation a
Continue reading on Dev.to
Opens in a new tab



