A kubernetes (k8s) construct to add logic about internal goings-on. It pairs nicely with CRDs, doing the logic portion.

There are frameworks to write these controllers like client-go and kube (rust).

If you generate sub-resources (like pods, etc), it’s important that you set the “owner reference” which informs the garbage collector to remove the object when the parent is deleted.

Controllers can make use of an “informer”, which is a handler that runs when changes are detected in a particular resource.

Useful resources