From the course: Automating Kubernetes with GitOps

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Understanding controllers and operators

Understanding controllers and operators - Kubernetes Tutorial

From the course: Automating Kubernetes with GitOps

Understanding controllers and operators

- Now that we know about the default ingredients, let's talk about controllers. So a Kubernetes controller monitors Kubernetes resources to make sure that the current state matches the desired state, and each resource type has its own controller. When Kubernetes APIs are extended using CRDs, new controllers can be added to realize new functionality. Each controller learns an infinite loop, where each iteration reconciles the desired state as described in the spec with the current state in the status of the resource definition, and the kube-controller-manager is a core Kubernetes process that takes care of all resource-specific controllers. Now let's talk about operators. A Kubernetes operator is an application-specific controller that manages the desired state of complex applications on behalf of a user. Operators may use CRDs to do their work, and often they do. All operators are controllers. The difference is that controllers are a part of core Kubernetes code, whereas operators are…

Contents