Debezium Operator
- Overview
- Deploy Debezium Operator using Helm
- Tracking the progress of the operator deployment
- DebeziumServer custom resource
- DebeziumServer specification
- DebeziumServer schema reference
- DebeziumServerStatus schema reference
- Condition schema reference
- DebeziumServerSpec schema reference
- Sink schema reference
- Source schema reference
- Format schema reference
- FormatType schema reference
- Quarkus schema reference
- Runtime schema reference
- RuntimeApi schema reference
- RuntimeStorage schema reference
- RuntimeEnvironment schema reference
- JmxConfig schema reference
- JmxAuthentication schema reference
- Templates schema reference
- Metrics schema reference
- JmxExporter schema reference
- Transformation schema reference
- Predicate schema reference
- ConfigMapOffsetStore schema reference
- ContainerEnvVar schema reference
- ContainerTemplate schema reference
- CustomStore schema reference
- DataStorage schema reference
- FileOffsetStore schema reference
- FileSchemaHistoryStore schema reference
- InMemoryOffsetStore schema reference
- InMemorySchemaHistoryStore schema reference
- JdbcOffsetStore schema reference
- JdbcOffsetTableConfig schema reference
- JdbcSchemaHistoryStore schema reference
- JdbcSchemaHistoryTableConfig schema reference
- KafkaOffsetStore schema reference
- KafkaSchemaHistoryStore schema reference
- MetadataTemplate schema reference
- Offset schema reference
- PodTemplate schema reference
- Probe schema reference
- Probes schema reference
- RedisOffsetStore schema reference
- RedisSchemaHistoryStore schema reference
- RedisStoreWaitConfig schema reference
- SchemaHistory schema reference
- Complete Debezium Server configuration example
Overview
The Debezium Operator is a Kubernetes operator that provides automated deployment and management of Debezium Server instances on Kubernetes and OpenShift platforms. This operator implements the standard Kubernetes operator pattern to transform user-defined DebeziumServer custom resources into running change data capture (CDC) pipelines that stream database changes to various sink systems.
Deploy Debezium Operator using Helm
Helm is the preferred method for installing the operator. The operator is available in the Debezium Helm Chart Repository. You can install the operator to an existing namespace, or to a new namespace.
-
Enter the following command to create a dedicated namespace:
kubectl create namespace debezium
-
Add the Debezium charts repository and install the operator by entering the following command:
helm repo add debezium https://charts.debezium.io helm install my-debezium-operator debezium/debezium-operator --version 3.2.0-final -n debezium
Due to a versioning problem, you must currently specify a version number, even if you just want to install the last stable version.
You can find the available versions of the operator in the Debezium Helm Chart Repository.
Tracking the progress of the operator deployment
You can run commands to monitor the progress of the deployment and view the operator log.
-
To monitor the progress of the deployment, run the following command:
kubectl get pod -n debezium --watch
-
To monitor the operator log, enter the following command:
kubectl logs deployment/debezium-operator -n debezium -f
After the operator is running, it watches for new custom resources and creates a Debezium Server instance that is based on those custom resources.
DebeziumServer custom resource
You specify the configuration for a Debezium Server instance by declaring properties in a DebeziumServer
custom resource.
apiVersion: debezium.io/v1alpha1
kind: DebeziumServer
metadata:
name: my-debezium-server
spec:
image: String
version: String
runtime:
environment:
vars:
- name: String
value: String
from: # EnvFromSource array
- sourceName: String
# add other EnvFromSource fields as needed
storage:
data:
type: persistent | ephemeral
claimName: String # required if type is "persistent"
external: # Volume array
- name: String
# add other Volume fields as needed
jmx:
enabled: boolean
port: int # defaults to 1099
templates:
container:
resources: ResourceRequirements
securityContext: SecurityContext
pod:
metadata:
annotations: # Map<String, String>
key: value
labels: # Map<String, String>
key: value
imagePullSecrets: # List
- name: String
affinity: Affinity
securityContext: PodSecurityContext
quarkus:
config:
# quarkus properties
format:
value:
type: String
config:
# format properties
key:
type: String
config:
# format properties
header:
type: String
config:
# format properties
transforms:
- type: String
predicate: String
negate: Boolean
config:
# transformation properties
predicates:
name:
type: String
config:
# predicate properties
sink:
type: String
config:
# sink properties
source:
class: String
config:
# source connector properties
DebeziumServer specification
DebeziumServer schema reference
Property | Type | Default | Description |
---|---|---|---|
No default value |
The specification of Debezium Server |
||
No default value |
The status of the Debezium Server instance. |
DebeziumServerStatus schema reference
Used in: DebeziumServer
Property | Type | Default | Description |
---|---|---|---|
No default value |
List of status conditions |
||
Long |
0 |
Latest observed generation |
Condition schema reference
Used in: DebeziumServerStatus
Property | Type | Default | Description |
---|---|---|---|
String |
No default value |
The status of the condition, either True, False or Unknown. |
|
String |
No default value |
Human-readable message indicating details about the condition’s last transition. |
|
String |
No default value |
Unique identifier of a condition. |
DebeziumServerSpec schema reference
Used in: DebeziumServer
Property | Type | Default | Description |
---|---|---|---|
String |
No default value |
Image used for Debezium Server container. This property takes precedence over version. |
|
String |
same as operator |
Version of Debezium Server to be used. |
|
No default value |
Sink configuration. |
||
No default value |
Debezium source connector configuration. |
||
No default value |
Message output format configuration. |
||
No default value |
Quarkus configuration passed to the Debezium Server process. |
||
No default value |
Specifies whether you can modify various aspects of the Debezium Server runtime. |
||
No default value |
Single Message Transformations employed by this instance of Debezium Server. |
||
No default value |
Predicates employed by this instance of Debezium Server. |
Sink schema reference
Used in: DebeziumServerSpec
Property | Type | Default | Description |
---|---|---|---|
String |
No default value |
Sink type recognized by this Debezium Server instance. |
|
Map |
No default value |
Sink configuration properties. |
Source schema reference
Used in: DebeziumServerSpec
Property | Type | Default | Description |
---|---|---|---|
String |
No default value |
Fully qualified name of source connector Java class. |
|
No default value |
Offset store configuration |
||
No default value |
Schema history store configuration |
||
Map |
No default value |
Source connector configuration properties. |
Format schema reference
Used in: DebeziumServerSpec
Property | Type | Default | Description |
---|---|---|---|
No default value |
Message key format configuration. |
||
No default value |
Message value format configuration. |
||
No default value |
Message header format configuration. |
FormatType schema reference
Used in: Format
Property | Type | Default | Description |
---|---|---|---|
String |
json |
Format type recognized by Debezium Server. |
|
Map |
No default value |
Format configuration properties. |
Quarkus schema reference
Used in: DebeziumServerSpec
Property | Type | Default | Description |
---|---|---|---|
Map |
No default value |
Quarkus configuration properties. |
Runtime schema reference
Used in: DebeziumServerSpec
Property | Type | Default | Description |
---|---|---|---|
No default value |
API configuration |
||
No default value |
Storage configuration |
||
No default value |
Additional environment variables used by this Debezium Server instance. |
||
No default value |
JMX configuration. |
||
No default value |
Debezium Server resource templates. |
||
String |
No default value |
An existing service account used to run the Debezium Server pod |
|
No default value |
Metrics configuration |
RuntimeApi schema reference
Used in: Runtime
Property | Type | Default | Description |
---|---|---|---|
boolean |
No default value |
Whether the API should be enabled for this instance of Debezium Server |
|
int |
8080 |
Port number used by the k8s service exposing the API |
RuntimeStorage schema reference
Used in: Runtime
Property | Type | Default | Description |
---|---|---|---|
No default value |
File storage configuration used by this instance of Debezium Server. |
||
No default value |
Additional volumes mounted to /debezium/external |
RuntimeEnvironment schema reference
Used in: Runtime
Property | Type | Default | Description |
---|---|---|---|
No default value |
Environment variables applied to the container. |
||
No default value |
Additional environment variables set from ConfigMaps or Secrets in containers. |
JmxConfig schema reference
Used in: Runtime
Property | Type | Default | Description |
---|---|---|---|
boolean |
false |
Whether JMX should be enabled for this Debezium Server instance. |
|
int |
1099 |
JMX port. |
|
No default value |
JMX authentication config. |
JmxAuthentication schema reference
Used in: JmxConfig
Property | Type | Default | Description |
---|---|---|---|
boolean |
false |
Whether JMX authentication should be enabled for this Debezium Server instance. |
|
String |
No default value |
Secret providing credential files |
|
String |
jmxremote.access |
JMX access file name and secret key |
|
String |
jmxremote.password |
JMX password file name and secret key |
Templates schema reference
Used in: Runtime
Property | Type | Default | Description |
---|---|---|---|
No default value |
Container template |
||
No default value |
Pod template. |
||
No default value |
PVC template for data volume if no explicit claim is specified. |
Metrics schema reference
Used in: Runtime
Property | Type | Default | Description |
---|---|---|---|
No default value |
Prometheus JMX exporter configuration |
JmxExporter schema reference
Used in: Metrics
Property | Type | Default | Description |
---|---|---|---|
boolean |
No default value |
Enables JMX Prometheus exporter |
|
ConfigMapKeySelector |
No default value |
Config map key reference which value will be used as configuration file |
Transformation schema reference
Used in: DebeziumServerSpec
Property | Type | Default | Description |
---|---|---|---|
String |
No default value |
Fully qualified name of Java class implementing the transformation. |
|
Map |
No default value |
Transformation specific configuration properties. |
|
String |
No default value |
The name of the predicate to be applied to this transformation. |
|
boolean |
false |
Determines if the result of the applied predicate will be negated. |
Predicate schema reference
Used in: DebeziumServerSpec
Property | Type | Default | Description |
---|---|---|---|
String |
No default value |
Fully qualified name of Java class implementing the predicate. |
|
Map |
No default value |
Predicate configuration properties. |
ConfigMapOffsetStore schema reference
Used in: Offset
Property | Type | Default | Description |
---|---|---|---|
String |
No default value |
Name of the offset config map |
|
Map |
No default value |
Additional store configuration properties. |
ContainerEnvVar schema reference
Used in: RuntimeEnvironment
Property | Type | Default | Description |
---|---|---|---|
String |
No default value |
The environment variable name. |
|
String |
No default value |
The environment variable value. |
ContainerTemplate schema reference
Used in: Templates
Property | Type | Default | Description |
---|---|---|---|
No default value |
CPU and memory resource requirements. |
||
No default value |
Container security context. |
||
No default value |
Container probes configuration. |
CustomStore schema reference
Used in: Offset
, SchemaHistory
Property | Type | Default | Description |
---|---|---|---|
String |
No default value |
Fully qualified name of Java class implementing the store. |
|
Map |
No default value |
Store configuration properties. |
DataStorage schema reference
Used in: RuntimeStorage
Property | Type | Default | Description |
---|---|---|---|
ephemeral,persistent |
ephemeral |
Storage type. |
|
String |
No default value |
Name of persistent volume claim for persistent storage. |
FileOffsetStore schema reference
Used in: Offset
Property | Type | Default | Description |
---|---|---|---|
String |
No default value |
Name of the offset file (relative to data root) |
|
Map |
No default value |
Additional store configuration properties. |
FileSchemaHistoryStore schema reference
Used in: SchemaHistory
Property | Type | Default | Description |
---|---|---|---|
String |
No default value |
Name of the offset file (relative to data root) |
|
Map |
No default value |
Additional store configuration properties. |
InMemoryOffsetStore schema reference
Used in: Offset
Property | Type | Default | Description |
---|---|---|---|
Map |
No default value |
Additional store configuration properties. |
InMemorySchemaHistoryStore schema reference
Used in: SchemaHistory
Property | Type | Default | Description |
---|---|---|---|
Map |
No default value |
Additional store configuration properties. |
JdbcOffsetStore schema reference
Used in: Offset
Property | Type | Default | Description |
---|---|---|---|
No default value |
The configuration of the offset table |
||
String |
No default value |
JDBC connection URL |
|
String |
No default value |
Username used to connect to the storage database |
|
String |
No default value |
Password used to connect to the storage database |
|
long |
No default value |
Retry delay on connection failure (in milliseconds) |
|
int |
No default value |
Maximum number of retries on connection failure |
|
Map |
No default value |
Additional store configuration properties. |
JdbcOffsetTableConfig schema reference
Used in: JdbcOffsetStore
Property | Type | Default | Description |
---|---|---|---|
String |
No default value |
The name of the offset table |
|
String |
No default value |
DDL statement to create the offset table |
|
String |
No default value |
Statement used to select from the offset table |
|
String |
No default value |
Statement used to insert into the offset table |
|
String |
No default value |
Statement used to update the offset table |
JdbcSchemaHistoryStore schema reference
Used in: SchemaHistory
Property | Type | Default | Description |
---|---|---|---|
No default value |
The configuration of the offset table |
||
String |
No default value |
JDBC connection URL |
|
String |
No default value |
Username used to connect to the storage database |
|
String |
No default value |
Password used to connect to the storage database |
|
long |
No default value |
Retry delay on connection failure (in milliseconds) |
|
int |
No default value |
Maximum number of retries on connection failure |
|
Map |
No default value |
Additional store configuration properties. |
JdbcSchemaHistoryTableConfig schema reference
Used in: JdbcSchemaHistoryStore
Property | Type | Default | Description |
---|---|---|---|
String |
No default value |
The name of the offset table |
|
String |
No default value |
DDL statement to create the schema history table |
|
String |
No default value |
Statement used to select from the schema history table |
|
String |
No default value |
Statement used to insert into the schema history table |
|
String |
No default value |
Statement used to check existence of some data in the schema history table |
KafkaOffsetStore schema reference
Used in: Offset
Property | Type | Default | Description |
---|---|---|---|
Map |
No default value |
Additional Kafka client properties. |
|
String |
No default value |
A list of host/port pairs that the connector uses for establishing an initial connection to the Kafka cluster |
|
String |
No default value |
The name of the Kafka topic where offsets are to be stored |
|
int |
No default value |
The number of partitions used when creating the offset storage topic |
|
int |
No default value |
Replication factor used when creating the offset storage topic |
|
Map |
No default value |
Additional store configuration properties. |
KafkaSchemaHistoryStore schema reference
Used in: SchemaHistory
Property | Type | Default | Description |
---|---|---|---|
String |
No default value |
A list of host/port pairs that the connector uses for establishing an initial connection to the Kafka cluster |
|
String |
No default value |
The name of the Kafka topic where offsets are to be stored |
|
int |
No default value |
The number of partitions used when creating the offset storage topic |
|
int |
No default value |
Replication factor used when creating the offset storage topic |
|
Map |
No default value |
Additional store configuration properties. |
MetadataTemplate schema reference
Used in: PodTemplate
Property | Type | Default | Description |
---|---|---|---|
Map<String, String> |
No default value |
Labels added to the Kubernetes resource |
|
Map<String, String> |
No default value |
Annotations added to the Kubernetes resource |
Offset schema reference
Used in: Source
Property | Type | Default | Description |
---|---|---|---|
No default value |
File backed offset store configuration |
||
No default value |
Memory backed offset store configuration |
||
No default value |
Redis backed offset store configuration |
||
No default value |
Kafka backing store configuration |
||
No default value |
JDBC backing store configuration |
||
No default value |
Config map backed offset store configuration |
||
No default value |
Arbitrary offset store configuration |
||
long |
60000 |
Interval at which to try commiting offsets |
PodTemplate schema reference
Used in: Templates
Property | Type | Default | Description |
---|---|---|---|
No default value |
Metadata applied to the resource. |
||
No default value |
List of local references to secrets used for pulling any of the images used by this Pod. |
||
No default value |
Pod affinity rules |
||
No default value |
Pod-level security attributes and container settings |
Probe schema reference
Used in: Probes
Property | Type | Default | Description |
---|---|---|---|
int |
5 |
Number of seconds after the container has started before probes are initiated. |
|
int |
10 |
How often (in seconds) to perform the probe. |
|
int |
10 |
Number of seconds after which the probe times out. |
|
int |
3 |
Number of failures in a row before the overall check has failed. |
Probes schema reference
Used in: ContainerTemplate
Property | Type | Default | Description |
---|---|---|---|
No default value |
Readiness probe configuration applied to the container. |
||
No default value |
Liveness probe configuration applied to the container. |
RedisOffsetStore schema reference
Used in: Offset
Property | Type | Default | Description |
---|---|---|---|
String |
No default value |
Redis host:port used to connect |
|
String |
No default value |
Redis username |
|
String |
No default value |
Redis password |
|
boolean |
false |
Redis username |
|
String |
No default value |
Redis hash key |
|
No default value |
Configures verification of replica writes |
||
Map |
No default value |
Additional store configuration properties. |
RedisSchemaHistoryStore schema reference
Used in: SchemaHistory
Property | Type | Default | Description |
---|---|---|---|
String |
No default value |
Redis host:port used to connect |
|
String |
No default value |
Redis username |
|
String |
No default value |
Redis password |
|
boolean |
false |
Redis username |
|
String |
No default value |
Redis hash key |
|
No default value |
Configures verification of replica writes |
||
Map |
No default value |
Additional store configuration properties. |
RedisStoreWaitConfig schema reference
Used in: RedisOffsetStore
, RedisSchemaHistoryStore
Property | Type | Default | Description |
---|---|---|---|
boolean |
false |
In case of Redis with replica, this allows to verify that the data has been written to replica |
|
long |
1000 |
Timeout in ms when waiting for replica |
|
boolean |
false |
Enables retry on wait for replica |
|
long |
1000 |
Delay of retry on wait |
SchemaHistory schema reference
Used in: Source
Property | Type | Default | Description |
---|---|---|---|
No default value |
File backed schema history store configuration |
||
No default value |
Memory backed schema history store configuration |
||
No default value |
Redis backed schema history store configuration |
||
No default value |
Kafka backed schema history store configuration |
||
No default value |
JDBC backed schema history store configuration |
||
No default value |
Arbitrary schema history store configuration |
||
Map |
No default value |
Additional common schema history store configuration properties. |
Complete Debezium Server configuration example
The following example shows a complete Debezium Server custom resource that incorporates properties from the preceding tables.
apiVersion: debezium.io/v1alpha1
kind: DebeziumServer
metadata:
name: my-debezium-server
spec:
version: "3.2.0"
source:
class: io.debezium.connector.mysql.MySqlConnector
config:
database.hostname: mysql-server
database.port: 3306
database.user: debezium
database.password: secret
database.server.id: 184054
topic.prefix: mysql
database.include.list: inventory
offset:
type: kafka
config:
bootstrap.servers: kafka:9092
topic: debezium-offsets
schemaHistory:
type: kafka
config:
bootstrap.servers: kafka:9092
topic: debezium-schema-history
sink:
type: kafka
config:
bootstrap.servers: kafka:9092
format:
key:
type: json
value:
type: json
config:
schemas.enable: false
runtime:
jmx:
enabled: true
port: 1099
storage:
data:
type: persistent
claimName: debezium-data-pvc
metrics:
jmxExporter:
enabled: true
transforms:
- type: io.debezium.transforms.UnwrapFromEnvelope
config:
drop.tombstones: false
predicate: inventory-filter
negate: false
predicates:
inventory-filter:
type: org.apache.kafka.connect.transforms.predicates.TopicNameMatches
config:
pattern: "mysql.inventory.*"
quarkus:
config:
quarkus.log.level: INFO
quarkus.http.port: 8080