Summary

Now that we’ve covered the basics of Kubernetes operators, Custom Resource Definitions, and Custom Resources, let’s tie it up together.
Think of the following scenario:
We need to dynamically provision a database when creating a new microservice.
To solve it using the operator pattern, we can create a CRD of kind Postgres with a database key in its specification (similar to the example in CRDs & CRs slide),
then, we’ll introduce a Kubernetes operator that will constantly watch for new custom resources of kind Postgres.
Once the operator detects a new CR of kind Postgres, it will provision a new database, and it will name it according to the database value in the CR.

From the CNCF operator white paper:

operator-pattern
operator-pattern

Learn More

To go deeper into Kubernetes operators, and Custom Resources, you can read the CNCF operator white paper that is also referenced above, and the Kubernetes documentaion on Custom Resources.

Last updated 26 Feb 2024, 22:53 +0200 . history