Gatekeeper – Policy Controller for Kubernetes
github.com
github.com
Tools like this and KNative make me feel like Kubernetes is the next UNIX: it’s a platform. You don’t use it to run a set of server processes. You use it to leverage an entire distributed platform.
This is a good system to control software deployment (i.e. controllers react to objects that represent the desired state of a set of containers and a way to access them) but it can be a lot more generic than that.
Kubernetes isn't like other systems where the core is locked down and users can add plugins that have limited privileges but aren't really the same as the built-in stuff -- examples include browser extensions, or maybe Lua plugins for Nginx.
In Kubernetes you can create objects and controllers that are first-class citizens just like the ones it comes with out of the box. They go in the same database as the built-in objects. You can remove or replace parts of the core system if you want to. This is what makes it a platform.
Gatekeeper is a CRD (Custom resource definition). This means that you can write policies as Kubernetes objects and deploy them to the cluster the same way you'd deploy any other object to cluster.
Gatekeeper policies are rego (created by OpenPolicyAgent), which is based on Datalog, and allows you to create these policies using a very rich and powerful language.
It's a controller which is configured by Kubernetes Custom Resources that extends Kubernetes as you say.
An operator generally creates Kubernetes objects as part of implementing a complex workflow that is normally taken care of by a human "operator". An example of this is the Cassandra operator, where you save a single object describing a Cassandra cluster at a fairly high level and the operator takes care of creating the pods and volumes and services and configuring the databases (and tearing it all down when you don't want it anymore).
A Postgres operator could manage Postgres instances in pods, or it could program AWS RDS. Having a deployable entity isn’t really required. The thing reading the API and updating those objects is definitely a controller.