Difficulty: Beginner
Estimated Time: 10 minutes

This tutorial shows how to enforce custom policies on Kubernetes objects using OPA. In this tutorial, you will define admission control rules that prevent users from creating Kubernetes Ingress objects that violate the following organization policy.

I took all the content from the OPA tutorial pages.

Kubernetes Admission Control - Bill's First Demo

Step 1 of 8

First you need to install OPA

curl -L -o opa https://github.com/open-policy-agent/opa/releases/download/v0.10.1/opa_linux_amd64

Set permissions on the OPA executable:

chmod 755 ./opa