Kubernetes Operators (Introduction)

Kubernetes Operators as introduced by CoreOS Inc. are admin-state-machines. Their purpose is to run some kind of software and maintain its operational state. It’s basically an admin in software.

A good set of requirements can be found here (“How can you create an Operator?”)

The very basic concept is grounded on custom resource definitions (CRD, since K8s 1.7, previously known as third party resources, TPR). They describe the to-operated service and its relation to other parts.

All resources the operator maintains should be actively watched. Each event should create one or more administrative task which then should be fed into a working queue to prevent race-conditions. There can be one queue per operated service or even more, depending on their operational impact (e.g. one for K8s-specific tasks like deployment, one for backup/restore and another one for user-management or something like that.)

Each task should check its prerequisites and postconditions and should be rather atomic. More advanced implementations may handle this inside the operator itself (e.g. block other queues during critical an operation).

There will be a PoC for, I think, MariaDB here soon.

Leave a Reply

Your email address will not be published. Required fields are marked *