liveBook · Manning

Custom resource definition

As explained in Kafka for Architects

A custom resource definition is a Kubernetes API extension that declares a new resource type and its schema.

A custom resource definition (CRD) extends Kubernetes so Kafka artifacts such as topics, connectors, and ACLs can be represented as Kubernetes resources. An operator translates those definitions into Kafka configurations. section 10.2.2

A GitOps workflow connects the definition to the running Kafka environment:

  • Define Kafka resources as YAML and store them in Git. section 10.2.2
  • Let Argo CD or Flux monitor Git and reconcile desired state with the Kubernetes cluster. section 10.2.2
  • Have the Kubernetes operator create, update, or delete the corresponding Kafka resources. section 10.2.2

Kafka configuration through Kubernetes

A team commits a topic definition as a CRD-backed YAML resource. After review, Argo CD detects the change, calculates the difference from cluster state, and the operator applies the required Kafka update. 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.

Shows Argo CD synchronizing Git-defined state with custom resources and applying the differences through a Kubernetes operator. section 10.2.2

How Kafka for Architects covers it

How deep it goes
Traces the YAML-to-Git-to-operator reconciliation flow without detailing CRD schema design or controller implementation.
Examples
Uses YAML definitions for Kafka topics, connectors, ACLs, and other resources.
What it assumes
Assumes Kubernetes, Git, and Kafka concepts while identifying operators and GitOps tools in the workflow.
What you can do after
Operate/configure Kafka resources through Git-backed Kubernetes reconciliation and an operator.
How it connects
Connects Kubernetes operators, GitOps, Argo CD, Flux, and Kafka configuration management.

Also explained in

Compare how 7 books explain custom resource definition →

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.