#CRD

1 posts

K8s Advanced #4: CRD and the Operator Pattern — controller-runtime
10 min read

K8s Advanced #4: CRD and the Operator Pattern — controller-runtime

One reason K8s is powerful is that you can extend its API itself. Defining new object kinds with CustomResourceDefinition and writing a reconcile loop for those objects with controller-runtime makes domain objects live as standard resources on top of K8s. Objects with names like PostgresCluster, RedisFailover, KafkaBroker are the result. This post organizes the CRD model, an Operator skeleton based on controller-runtime, and ownerReference / finalizer / status subresource — all in one cycle.