liveBook · Manning

Kubernetes operator

As explained in Kafka for Architects

A Kubernetes operator is a controller pattern that automates management of an application or service by reconciling its desired and actual state through the Kubernetes API.

A Kubernetes operator extends Kubernetes with custom controllers for complex, stateful applications. For Kafka, it translates Kubernetes custom resource definitions (CRDs) into actual Kafka configurations and helps automate scaling, self-healing, and rolling updates. section 10.2.2

A GitOps-driven Kafka configuration flow typically works as follows:

  • Define Kafka resources such as topics, connectors, and ACLs as YAML-based CRDs, then store them in Git. section 10.2.2
  • Use Argo CD or Flux to monitor Git through a pull-based workflow and synchronize declared resources with cluster state. section 10.2.2
  • Let the operator create, update, or delete the corresponding Kafka resources after configuration changes are synchronized. section 10.2.2

Kafka on Kubernetes

A team commits a changed Kafka resource to Git. Argo CD detects the difference between the declared state and the cluster’s custom resources, applies the update, and the operator translates it into Kafka configuration. Strimzi and Confluent for Kubernetes are examples of operators used for this purpose. section 10.2.2

Figure 10.3 Applying changes with a Kubernetes operator. Argo CD synchronizes the desired state from Git with the current state of custom resources in the cluster, and applies the differences automatically.
A diagram of a computer system

AI-generated content may be incorrect.

The diagram traces how Argo CD synchronizes desired state from Git with current custom resources and applies the differences automatically. section 10.2.2

How Kafka for Architects covers it

How deep it goes
Explains CRD translation, synchronization, and resource updates, while stopping short of implementation internals.
Examples
Uses Kafka topics, connectors, ACLs, Strimzi, Confluent for Kubernetes, Argo CD, and Flux as concrete examples.
What it assumes
Assumes Kubernetes deployment and GitOps concepts; contrasts this approach with non-Kubernetes AsyncAPI-driven automation.
What you can do after
Operate/configure Kafka resources declaratively through Kubernetes CRDs and GitOps synchronization.
How it connects
Connects Kubernetes operators with Kafka, GitOps, custom resource definitions, Argo CD, Flux, and rolling updates.

Also explained in

Compare how 7 books explain Kubernetes operator →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kafka for Architects. The section links point to the parts of the book it draws on.