Skip to content

Latest commit

 

History

History
executable file
·
27 lines (12 loc) · 1.32 KB

File metadata and controls

executable file
·
27 lines (12 loc) · 1.32 KB

OPA in Kubernetes

In this section, we will take a look at OPA in Kubernetes.

  • Instead of building our own admission controller server and writing the logic for validations, we now have OPA running and all our policies in it. So instead we connect our mutating or validating webhooks now to OPA.

How does OPA know about the resources in Kubernetes?

We can make that happen using the kubemanagement service. Kubemanagement is a service deployed as a sidecar container along with OPA and is used to replicate resource definitions from Kubernetes so they can be cached at OPA. This information can then be imported as we just saw and used to refer to objects in Kubernetes while developing policies. It is also used to load policies into OPA by simply creating a config map object in Kubernetes as opposed to loading the policies directly on OPA.

References: