How to Generate a Scaffold Operator

Learn how to generate a scaffold operator project.

Overview

We’ve heard about controllers. Kubernetes ships large quantities of controllers in the kube-controller-manager. We’ve also heard about operators. So, what’s the difference between them? Are they the same thing, but with different names?

In the Kubernetes glossary, a controller refers to a control loop that keeps watching the changing status of certain objects and drives them to the desired state. For example, the Deployment controller keeps watching all the Deployment objects and turns them into ReplicaSet objects. Typically, controllers are part of the Kubernetes controller manager in the control plane.

On the other hand, operators always come with CRDs. They supervise the custom resources and some core resources. Essentially, operators are controllers. They build upon the basic Kubernetes controller concepts, but bring in application-specific knowledge, operational domain knowledge, and so on. We can say operators extend what controllers can do.

Now, in this lesson, let’s learn how to scaffold an operator.

Get hands-on with 1400+ tech skills courses.