Kubernetes Operators Best Practices

Kubernetes Operators Best Practices

  • June 28, 2019
Table of Contents

Kubernetes Operators Best Practices

Kubernetes Operators are processes connecting to the master API and watching for events, typically on a limited number of resource types. When a relevant event occurs, the operator reacts and performs a specific action. This may be limited to interacting with the master API only, but will often involve performing some action on some other systems (this could be either in cluster or off cluster resources).

Operators are implemented as a collection of controllers where each controller watches a specific resource type. When a relevant event occurs on a watched resource a reconcile cycle is started. During the reconcile cycle, the controller has the responsibility to check that current state matches the desired state described by the watched resource.

Interestingly, by design, the event is not passed to the reconcile cycle, which is then forced to consider the whole state of the instance that was referenced by the event. This approach is referred to as level-based, as opposed to edge-based. Deriving from electronic circuit design, level-based triggering is the idea of receiving an event (an interrupt for example) and reacting to a state, while edge-based triggering is the idea of receiving an event and reacting to a state variation.

Source: openshift.com

Tags :
Share :
comments powered by Disqus

Related Posts

Reaching for the Stars with Ansible Operator

Reaching for the Stars with Ansible Operator

In this post I will show you how to use Roles published to Ansible Galaxy as an Operator to manage an application in Kubernetes. Reusing a Role in this way provides an example of how to create an Operator that simply installs an application with the flexibility to expand and customize the behavior organically as requirements dictate. I will leverage both the Ansible Operator and the k8s module to demonstrate how you can use Ansible to create Kubernetes native applications.

Read More
Write operators for databases in Kubernetes with KubeDB

Write operators for databases in Kubernetes with KubeDB

Running production quality databases in Kubernetes can be quite a hassle. But KubeDB promises to solve all your problems. Let’s have a quick look at this framework.

Read More