kubectl get KafkaConnector
-diff --git a/contributing/guide/contributing.html b/contributing/guide/contributing.html index 761152605..0ff88edf0 100644 --- a/contributing/guide/contributing.html +++ b/contributing/guide/contributing.html @@ -1516,7 +1516,7 @@
Revised on 2023-11-13 15:53:19 UTC
+Revised on 2023-11-13 16:26:03 UTC
diff --git a/contributing/guide/full.html b/contributing/guide/full.html index c75ef3790..6294bc30a 100644 --- a/contributing/guide/full.html +++ b/contributing/guide/full.html @@ -1957,7 +1957,7 @@Revised on 2023-11-13 15:53:17 UTC
+Revised on 2023-11-13 16:26:00 UTC
@@ -1965,7 +1965,7 @@Revised on 2023-11-13 15:53:19 UTC
+Revised on 2023-11-13 16:26:03 UTC
diff --git a/docs/operators/in-development/deploying-book.html b/docs/operators/in-development/deploying-book.html index 10641cb80..512e8073c 100644 --- a/docs/operators/in-development/deploying-book.html +++ b/docs/operators/in-development/deploying-book.html @@ -58,29 +58,38 @@The following resources are created by the Cluster Operator in the Kubernetes cluster:
+Name given to the following Kafka Connect resources:
+StrimziPodSet that creates the Kafka Connect worker node pods.
+Headless service that provides stable DNS names to the Kafka Connect pods.
+Service account used by the Kafka Connect pods.
+Pod disruption budget configured for the Kafka Connect worker nodes.
+Network policy managing access to the Kafka Connect REST API.
+Pods created by the Kafka Connect StrimziPodSet.
+Service which exposes the REST interface for managing the Kafka Connect cluster.
+ConfigMap which contains the Kafka Connect ancillary configuration and is mounted as a volume by the Kafka Connect pods.
+Cluster role binding used by the Kafka Connect cluster.
+Pod used to build a new container image with additional connector plugins (only when Kafka Connect Build feature is used).
+ConfigMap with the Dockerfile generated to build the new container image with additional connector plugins (only when the Kafka Connect build feature is used).
+Kafka Connect uses connectors to integrate with other systems to stream data.
A connector is an instance of a Kafka Connector
class, which can be one of the following type:
You can also create new connector instances using these options.
Configure Kafka Connect so that Strimzi automatically builds a new container image with additional connectors.
You define the connector plugins using the .spec.build.plugins
property of the KafkaConnect
custom resource.
@@ -3509,8 +3580,8 @@
Create a custom Docker image with connector plugins from the Kafka Connect base image.
Add the custom image to the /opt/kafka/plugins
directory.
Deploy KafkaConnector
resources to manage connectors.
The KafkaConnector
custom resource offers a Kubernetes-native approach to management of connectors by the Cluster Operator.
@@ -3891,7 +3962,7 @@
The connector configuration is defined in the spec.config
property of the KafkaConnector
resource.
If you are using KafkaConnector
resources to manage connectors, use the restart
annotation to manually trigger a restart of a connector.
The Cluster Operator is running.
-Find the name of the KafkaConnector
custom resource that controls the Kafka connector you want to restart:
kubectl get KafkaConnector
-Restart the connector by annotating the KafkaConnector
resource in Kubernetes.
kubectl annotate KafkaConnector <kafka_connector_name> strimzi.io/restart=true
-The restart
annotation is set to true
.
Wait for the next reconciliation to occur (every two minutes by default).
-The Kafka connector is restarted, as long as the annotation was detected by the reconciliation process.
-When Kafka Connect accepts the restart request, the annotation is removed from the KafkaConnector
custom resource.
If you are using KafkaConnector
resources to manage connectors, use the restart-task
annotation to manually trigger a restart of a connector task.
The Cluster Operator is running.
-Find the name of the KafkaConnector
custom resource that controls the Kafka connector task you want to restart:
kubectl get KafkaConnector
-Find the ID of the task to be restarted from the KafkaConnector
custom resource.
-Task IDs are non-negative integers, starting from 0:
kubectl describe KafkaConnector <kafka_connector_name>
-Use the ID to restart the connector task by annotating the KafkaConnector
resource in Kubernetes:
kubectl annotate KafkaConnector <kafka_connector_name> strimzi.io/restart-task=0
-In this example, task 0
is restarted.
Wait for the next reconciliation to occur (every two minutes by default).
-The Kafka connector task is restarted, as long as the annotation was detected by the reconciliation process.
-When Kafka Connect accepts the restart request, the annotation is removed from the KafkaConnector
custom resource.
Use the Kafka Connect REST API as an alternative to using KafkaConnector
resources to manage connectors.
The Kafka Connect REST API is available as a service running on <connect_cluster_name>-connect-api:8083
, where <connect_cluster_name> is the name of your Kafka Connect cluster.
@@ -4204,8 +4176,8 @@
It is crucial to restrict access to the Kafka Connect API only to trusted users to prevent unauthorized actions and potential security issues. The Kafka Connect API provides extensive capabilities for altering connector configurations, which makes it all the more important to take security precautions. @@ -4285,8 +4257,8 @@
You can switch from using the Kafka Connect API to using KafkaConnector
custom resources to manage your connectors.
To make the switch, do the following in the order shown:
The following resources are created by the Cluster Operator in the Kubernetes cluster:
-Name given to the following Kafka Connect resources:
-StrimziPodSet that creates the Kafka Connect worker node pods.
-Headless service that provides stable DNS names to the Kafka Connect pods.
-Service account used by the Kafka Connect pods.
-Pod disruption budget configured for the Kafka Connect worker nodes.
-Network policy managing access to the Kafka Connect REST API.
-Pods created by the Kafka Connect StrimziPodSet.
-Service which exposes the REST interface for managing the Kafka Connect cluster.
-ConfigMap which contains the Kafka Connect ancillary configuration and is mounted as a volume by the Kafka Connect pods.
-Cluster role binding used by the Kafka Connect cluster.
-Pod used to build a new container image with additional connector plugins (only when Kafka Connect Build feature is used).
-ConfigMap with the Dockerfile generated to build the new container image with additional connector plugins (only when the Kafka Connect build feature is used).
-Kafka MirrorMaker replicates data between two or more Kafka clusters, within or across data centers. This process is called mirroring to avoid confusion with the concept of Kafka partition replication. @@ -4409,7 +4323,7 @@
This procedure shows how to deploy a Kafka MirrorMaker cluster to your Kubernetes cluster using the Cluster Operator.
The following resources are created by the Cluster Operator in the Kubernetes cluster:
The following resources are created by the Cluster Operator in the Kubernetes cluster:
Kafka Bridge provides an API for integrating HTTP-based clients with a Kafka cluster.
This procedure shows how to deploy a Kafka Bridge cluster to your Kubernetes cluster using the Cluster Operator.
Use port forwarding to expose the Strimzi Kafka Bridge service to your local machine on http://localhost:8080.
After deployment, the Strimzi Kafka Bridge can only be accessed by applications running in the same Kubernetes cluster.
These applications use the <kafka_bridge_name>-bridge-service
service to access the API.
The following resources are created by the Cluster Operator in the Kubernetes cluster:
You can perform a standalone deployment of the Topic Operator and User Operator. Consider a standalone deployment of these operators if you are using a Kafka cluster that is not managed by the Cluster Operator.
@@ -4836,7 +4750,7 @@This procedure shows how to deploy the Topic Operator as a standalone component for topic management. You can use a standalone Topic Operator with a Kafka cluster that is not managed by the Cluster Operator.
@@ -5228,7 +5142,7 @@If you are using KafkaConnector
resources to configure connectors, use the state
configuration to either stop or pause a connector.
+In contrast to the paused state, where the connector and tasks remain instantiated, stopping a connector retains only the configuration, with no active processes.
+Stopping a connector from running may be more suitable for longer durations than just pausing.
+While a paused connector is quicker to resume, a stopped connector has the advantages of freeing up memory and resources.
+ Note
+ |
+
+The state configuration replaces the (deprecated) pause configuration in the KafkaConnectorSpec schema, which allows pauses on connectors.
+If you were previously using the pause configuration to pause connectors, we encourage you to transition to using the state configuration only to avoid conflicts.
+ |
+
The Cluster Operator is running.
+Find the name of the KafkaConnector
custom resource that controls the connector you want to pause or stop:
kubectl get KafkaConnector
+Edit the KafkaConnector
resource to stop or pause the connector.
apiVersion: kafka.strimzi.io/v1beta2
+kind: KafkaConnector
+metadata:
+ name: my-source-connector
+ labels:
+ strimzi.io/cluster: my-connect-cluster
+spec:
+ class: org.apache.kafka.connect.file.FileStreamSourceConnector
+ tasksMax: 2
+ config:
+ file: "/opt/kafka/LICENSE"
+ topic: my-topic
+ state: stopped
+ # ...
+Change the state
configuration to stopped
or paused
.
+The default state for the connector when this property is not set is running
.
Apply the changes to the KafkaConnector
configuration.
You can resume the connector by changing state
to running
or removing the configuration.
+ Note
+ |
+
+Alternatively, you can expose the Kafka Connect API and use the stop and pause endpoints to stop a connector from running.
+For example, PUT /connectors/<connector_name>/stop .
+You can then use the resume endpoint to restart it.
+ |
+
If you are using KafkaConnector
resources to manage connectors, use the strimzi.io/restart
annotation to manually trigger a restart of a connector.
The Cluster Operator is running.
+Find the name of the KafkaConnector
custom resource that controls the Kafka connector you want to restart:
kubectl get KafkaConnector
+Restart the connector by annotating the KafkaConnector
resource in Kubernetes:
kubectl annotate KafkaConnector <kafka_connector_name> strimzi.io/restart=true
+The restart
annotation is set to true
.
Wait for the next reconciliation to occur (every two minutes by default).
+The Kafka connector is restarted, as long as the annotation was detected by the reconciliation process.
+When Kafka Connect accepts the restart request, the annotation is removed from the KafkaConnector
custom resource.
If you are using KafkaConnector
resources to manage connectors, use the strimzi.io/restart-task
annotation to manually trigger a restart of a connector task.
The Cluster Operator is running.
+Find the name of the KafkaConnector
custom resource that controls the Kafka connector task you want to restart:
kubectl get KafkaConnector
+Find the ID of the task to be restarted from the KafkaConnector
custom resource:
kubectl describe KafkaConnector <kafka_connector_name>
+Task IDs are non-negative integers, starting from 0.
+Use the ID to restart the connector task by annotating the KafkaConnector
resource in Kubernetes:
kubectl annotate KafkaConnector <kafka_connector_name> strimzi.io/restart-task=0
+In this example, task 0
is restarted.
Wait for the next reconciliation to occur (every two minutes by default).
+The Kafka connector task is restarted, as long as the annotation was detected by the reconciliation process.
+When Kafka Connect accepts the restart request, the annotation is removed from the KafkaConnector
custom resource.
If you are using KafkaMirrorMaker2
resources to configure internal MirrorMaker connectors, use the state
configuration to either stop or pause a connector.
+In contrast to the paused state, where the connector and tasks remain instantiated, stopping a connector retains only the configuration, with no active processes.
+Stopping a connector from running may be more suitable for longer durations than just pausing.
+While a paused connector is quicker to resume, a stopped connector has the advantages of freeing up memory and resources.
+ Note
+ |
+
+The state configuration replaces the (deprecated) pause configuration in the KafkaMirrorMaker2ConnectorSpec schema, which allows pauses on connectors.
+If you were previously using the pause configuration to pause connectors, we encourage you to transition to using the state configuration only to avoid conflicts.
+ |
+
The Cluster Operator is running.
+Find the name of the KafkaMirrorMaker2
custom resource that controls the MirrorMaker 2 connector you want to pause or stop:
kubectl get KafkaMirrorMaker2
+Edit the KafkaMirrorMaker2
resource to stop or pause the connector.
apiVersion: kafka.strimzi.io/v1beta2
+kind: KafkaMirrorMaker2
+metadata:
+ name: my-mirror-maker2
+spec:
+ version: 3.6.0
+ replicas: 3
+ connectCluster: "my-cluster-target"
+ clusters:
+ # ...
+ mirrors:
+ - sourceCluster: "my-cluster-source"
+ targetCluster: "my-cluster-target"
+ sourceConnector:
+ tasksMax: 10
+ autoRestart:
+ enabled: true
+ state: stopped
+ # ...
+Change the state
configuration to stopped
or paused
.
+The default state for the connector when this property is not set is running
.
Apply the changes to the KafkaMirrorMaker2
configuration.
You can resume the connector by changing state
to running
or removing the configuration.
+ Note
+ |
+
+Alternatively, you can expose the Kafka Connect API and use the stop and pause endpoints to stop a connector from running.
+For example, PUT /connectors/<connector_name>/stop .
+You can then use the resume endpoint to restart it.
+ |
+
Use the strimzi.io/restart-connector
annotation to manually trigger a restart of a MirrorMaker 2 connector.
The Cluster Operator is running.
+Find the name of the KafkaMirrorMaker2
custom resource that controls the Kafka MirrorMaker 2 connector you want to restart:
kubectl get KafkaMirrorMaker2
+Find the name of the Kafka MirrorMaker 2 connector to be restarted from the KafkaMirrorMaker2
custom resource:
kubectl describe KafkaMirrorMaker2 <mirrormaker_cluster_name>
+Use the name of the connector to restart the connector by annotating the KafkaMirrorMaker2
resource in Kubernetes:
kubectl annotate KafkaMirrorMaker2 <mirrormaker_cluster_name> "strimzi.io/restart-connector=<mirrormaker_connector_name>"
+In this example, connector my-connector
in the my-mirror-maker-2
cluster is restarted:
kubectl annotate KafkaMirrorMaker2 my-mirror-maker-2 "strimzi.io/restart-connector=my-connector"
+Wait for the next reconciliation to occur (every two minutes by default).
+The MirrorMaker 2 connector is restarted, as long as the annotation was detected by the reconciliation process.
+When MirrorMaker 2 accepts the request, the annotation is removed from the KafkaMirrorMaker2
custom resource.
Use the strimzi.io/restart-connector-task
annotation to manually trigger a restart of a MirrorMaker 2 connector.
The Cluster Operator is running.
+Find the name of the KafkaMirrorMaker2
custom resource that controls the MirrorMaker 2 connector task you want to restart:
kubectl get KafkaMirrorMaker2
+Find the name of the connector and the ID of the task to be restarted from the KafkaMirrorMaker2
custom resource:
kubectl describe KafkaMirrorMaker2 <mirrormaker_cluster_name>
+Task IDs are non-negative integers, starting from 0.
+Use the name and ID to restart the connector task by annotating the KafkaMirrorMaker2
resource in Kubernetes:
kubectl annotate KafkaMirrorMaker2 <mirrormaker_cluster_name> "strimzi.io/restart-connector-task=<mirrormaker_connector_name>:<task_id>"
+In this example, task 0
for connector my-connector
in the my-mirror-maker-2
cluster is restarted:
kubectl annotate KafkaMirrorMaker2 my-mirror-maker-2 "strimzi.io/restart-connector-task=my-connector:0"
+Wait for the next reconciliation to occur (every two minutes by default).
+The MirrorMaker 2 connector task is restarted, as long as the annotation was detected by the reconciliation process.
+When MirrorMaker 2 accepts the request, the annotation is removed from the KafkaMirrorMaker2
custom resource.
This procedure describes how to manually trigger a restart of a Kafka MirrorMaker 2 connector by using a Kubernetes annotation.
-The Cluster Operator is running.
-Find the name of the KafkaMirrorMaker2
custom resource that controls the Kafka MirrorMaker 2 connector you want to restart:
kubectl get KafkaMirrorMaker2
-Find the name of the Kafka MirrorMaker 2 connector to be restarted from the KafkaMirrorMaker2
custom resource.
kubectl describe KafkaMirrorMaker2 KAFKAMIRRORMAKER-2-NAME
-To restart the connector, annotate the KafkaMirrorMaker2
resource in Kubernetes.
-In this example, kubectl annotate
restarts a connector named my-source->my-target.MirrorSourceConnector
:
kubectl annotate KafkaMirrorMaker2 KAFKAMIRRORMAKER-2-NAME "strimzi.io/restart-connector=my-source->my-target.MirrorSourceConnector"
-Wait for the next reconciliation to occur (every two minutes by default).
-The Kafka MirrorMaker 2 connector is restarted, as long as the annotation was detected by the reconciliation process.
-When the restart request is accepted, the annotation is removed from the KafkaMirrorMaker2
custom resource.
This procedure describes how to manually trigger a restart of a Kafka MirrorMaker 2 connector task by using a Kubernetes annotation.
-The Cluster Operator is running.
-Find the name of the KafkaMirrorMaker2
custom resource that controls the Kafka MirrorMaker 2 connector you want to restart:
kubectl get KafkaMirrorMaker2
-Find the name of the Kafka MirrorMaker 2 connector and the ID of the task to be restarted from the KafkaMirrorMaker2
custom resource.
-Task IDs are non-negative integers, starting from 0.
kubectl describe KafkaMirrorMaker2 KAFKAMIRRORMAKER-2-NAME
-To restart the connector task, annotate the KafkaMirrorMaker2
resource in Kubernetes.
-In this example, kubectl annotate
restarts task 0 of a connector named my-source->my-target.MirrorSourceConnector
:
kubectl annotate KafkaMirrorMaker2 KAFKAMIRRORMAKER-2-NAME "strimzi.io/restart-connector-task=my-source->my-target.MirrorSourceConnector:0"
-Wait for the next reconciliation to occur (every two minutes by default).
-The Kafka MirrorMaker 2 connector task is restarted, as long as the annotation was detected by the reconciliation process.
-When the restart task request is accepted, the annotation is removed from the KafkaMirrorMaker2
custom resource.
You can recover a Kafka cluster from persistent volumes (PVs) if they are still present.
Recovery from namespace deletion is possible because of the relationship between persistent volumes and namespaces.
A PersistentVolume
(PV) is a storage resource that lives outside of a namespace.
@@ -36278,14 +36476,14 @@
When a cluster is lost, you can use the data from disks/volumes to recover the cluster if they were preserved within the infrastructure. The recovery procedure is the same as with namespace deletion, assuming PVs can be recovered and they were created manually.
This procedure describes how to recover a deleted cluster from persistent volumes (PVs).
You can uninstall Strimzi using the CLI or by unsubscribing from OperatorHub.io.
This procedure describes how to use the kubectl
command-line tool to uninstall Strimzi and remove resources related to the deployment.
This procedure describes how to uninstall Strimzi from OperatorHub.io and remove resources related to the deployment.
Revised on 2023-11-13 15:53:17 UTC
+Revised on 2023-11-13 16:26:00 UTC
The following resources are created by the Cluster Operator in the Kubernetes cluster:
+Name given to the following Kafka Connect resources:
+StrimziPodSet that creates the Kafka Connect worker node pods.
+Headless service that provides stable DNS names to the Kafka Connect pods.
+Service account used by the Kafka Connect pods.
+Pod disruption budget configured for the Kafka Connect worker nodes.
+Network policy managing access to the Kafka Connect REST API.
+Pods created by the Kafka Connect StrimziPodSet.
+Service which exposes the REST interface for managing the Kafka Connect cluster.
+ConfigMap which contains the Kafka Connect ancillary configuration and is mounted as a volume by the Kafka Connect pods.
+Cluster role binding used by the Kafka Connect cluster.
+Pod used to build a new container image with additional connector plugins (only when Kafka Connect Build feature is used).
+ConfigMap with the Dockerfile generated to build the new container image with additional connector plugins (only when the Kafka Connect build feature is used).
+Kafka Connect uses connectors to integrate with other systems to stream data.
A connector is an instance of a Kafka Connector
class, which can be one of the following type:
You can also create new connector instances using these options.
Configure Kafka Connect so that Strimzi automatically builds a new container image with additional connectors.
You define the connector plugins using the .spec.build.plugins
property of the KafkaConnect
custom resource.
@@ -3950,8 +4021,8 @@
Create a custom Docker image with connector plugins from the Kafka Connect base image.
Add the custom image to the /opt/kafka/plugins
directory.
Deploy KafkaConnector
resources to manage connectors.
The KafkaConnector
custom resource offers a Kubernetes-native approach to management of connectors by the Cluster Operator.
@@ -4332,7 +4403,7 @@
The connector configuration is defined in the spec.config
property of the KafkaConnector
resource.
If you are using KafkaConnector
resources to manage connectors, use the restart
annotation to manually trigger a restart of a connector.
The Cluster Operator is running.
-Find the name of the KafkaConnector
custom resource that controls the Kafka connector you want to restart:
kubectl get KafkaConnector
-Restart the connector by annotating the KafkaConnector
resource in Kubernetes.
kubectl annotate KafkaConnector <kafka_connector_name> strimzi.io/restart=true
-The restart
annotation is set to true
.
Wait for the next reconciliation to occur (every two minutes by default).
-The Kafka connector is restarted, as long as the annotation was detected by the reconciliation process.
-When Kafka Connect accepts the restart request, the annotation is removed from the KafkaConnector
custom resource.
If you are using KafkaConnector
resources to manage connectors, use the restart-task
annotation to manually trigger a restart of a connector task.
The Cluster Operator is running.
-Find the name of the KafkaConnector
custom resource that controls the Kafka connector task you want to restart:
kubectl get KafkaConnector
-Find the ID of the task to be restarted from the KafkaConnector
custom resource.
-Task IDs are non-negative integers, starting from 0:
kubectl describe KafkaConnector <kafka_connector_name>
-Use the ID to restart the connector task by annotating the KafkaConnector
resource in Kubernetes:
kubectl annotate KafkaConnector <kafka_connector_name> strimzi.io/restart-task=0
-In this example, task 0
is restarted.
Wait for the next reconciliation to occur (every two minutes by default).
-The Kafka connector task is restarted, as long as the annotation was detected by the reconciliation process.
-When Kafka Connect accepts the restart request, the annotation is removed from the KafkaConnector
custom resource.
Use the Kafka Connect REST API as an alternative to using KafkaConnector
resources to manage connectors.
The Kafka Connect REST API is available as a service running on <connect_cluster_name>-connect-api:8083
, where <connect_cluster_name> is the name of your Kafka Connect cluster.
@@ -4645,8 +4617,8 @@
It is crucial to restrict access to the Kafka Connect API only to trusted users to prevent unauthorized actions and potential security issues. The Kafka Connect API provides extensive capabilities for altering connector configurations, which makes it all the more important to take security precautions. @@ -4726,8 +4698,8 @@
You can switch from using the Kafka Connect API to using KafkaConnector
custom resources to manage your connectors.
To make the switch, do the following in the order shown:
The following resources are created by the Cluster Operator in the Kubernetes cluster:
-Name given to the following Kafka Connect resources:
-StrimziPodSet that creates the Kafka Connect worker node pods.
-Headless service that provides stable DNS names to the Kafka Connect pods.
-Service account used by the Kafka Connect pods.
-Pod disruption budget configured for the Kafka Connect worker nodes.
-Network policy managing access to the Kafka Connect REST API.
-Pods created by the Kafka Connect StrimziPodSet.
-Service which exposes the REST interface for managing the Kafka Connect cluster.
-ConfigMap which contains the Kafka Connect ancillary configuration and is mounted as a volume by the Kafka Connect pods.
-Cluster role binding used by the Kafka Connect cluster.
-Pod used to build a new container image with additional connector plugins (only when Kafka Connect Build feature is used).
-ConfigMap with the Dockerfile generated to build the new container image with additional connector plugins (only when the Kafka Connect build feature is used).
-Kafka MirrorMaker replicates data between two or more Kafka clusters, within or across data centers. This process is called mirroring to avoid confusion with the concept of Kafka partition replication. @@ -4850,7 +4764,7 @@
This procedure shows how to deploy a Kafka MirrorMaker cluster to your Kubernetes cluster using the Cluster Operator.
The following resources are created by the Cluster Operator in the Kubernetes cluster:
The following resources are created by the Cluster Operator in the Kubernetes cluster:
Kafka Bridge provides an API for integrating HTTP-based clients with a Kafka cluster.
This procedure shows how to deploy a Kafka Bridge cluster to your Kubernetes cluster using the Cluster Operator.
Use port forwarding to expose the Strimzi Kafka Bridge service to your local machine on http://localhost:8080.
After deployment, the Strimzi Kafka Bridge can only be accessed by applications running in the same Kubernetes cluster.
These applications use the <kafka_bridge_name>-bridge-service
service to access the API.
The following resources are created by the Cluster Operator in the Kubernetes cluster:
You can perform a standalone deployment of the Topic Operator and User Operator. Consider a standalone deployment of these operators if you are using a Kafka cluster that is not managed by the Cluster Operator.
@@ -5277,7 +5191,7 @@This procedure shows how to deploy the Topic Operator as a standalone component for topic management. You can use a standalone Topic Operator with a Kafka cluster that is not managed by the Cluster Operator.
@@ -5669,7 +5583,7 @@If you are using KafkaConnector
resources to configure connectors, use the state
configuration to either stop or pause a connector.
+In contrast to the paused state, where the connector and tasks remain instantiated, stopping a connector retains only the configuration, with no active processes.
+Stopping a connector from running may be more suitable for longer durations than just pausing.
+While a paused connector is quicker to resume, a stopped connector has the advantages of freeing up memory and resources.
+ Note
+ |
+
+The state configuration replaces the (deprecated) pause configuration in the KafkaConnectorSpec schema, which allows pauses on connectors.
+If you were previously using the pause configuration to pause connectors, we encourage you to transition to using the state configuration only to avoid conflicts.
+ |
+
The Cluster Operator is running.
+Find the name of the KafkaConnector
custom resource that controls the connector you want to pause or stop:
kubectl get KafkaConnector
+Edit the KafkaConnector
resource to stop or pause the connector.
apiVersion: kafka.strimzi.io/v1beta2
+kind: KafkaConnector
+metadata:
+ name: my-source-connector
+ labels:
+ strimzi.io/cluster: my-connect-cluster
+spec:
+ class: org.apache.kafka.connect.file.FileStreamSourceConnector
+ tasksMax: 2
+ config:
+ file: "/opt/kafka/LICENSE"
+ topic: my-topic
+ state: stopped
+ # ...
+Change the state
configuration to stopped
or paused
.
+The default state for the connector when this property is not set is running
.
Apply the changes to the KafkaConnector
configuration.
You can resume the connector by changing state
to running
or removing the configuration.
+ Note
+ |
+
+Alternatively, you can expose the Kafka Connect API and use the stop and pause endpoints to stop a connector from running.
+For example, PUT /connectors/<connector_name>/stop .
+You can then use the resume endpoint to restart it.
+ |
+
If you are using KafkaConnector
resources to manage connectors, use the strimzi.io/restart
annotation to manually trigger a restart of a connector.
The Cluster Operator is running.
+Find the name of the KafkaConnector
custom resource that controls the Kafka connector you want to restart:
kubectl get KafkaConnector
+Restart the connector by annotating the KafkaConnector
resource in Kubernetes:
kubectl annotate KafkaConnector <kafka_connector_name> strimzi.io/restart=true
+The restart
annotation is set to true
.
Wait for the next reconciliation to occur (every two minutes by default).
+The Kafka connector is restarted, as long as the annotation was detected by the reconciliation process.
+When Kafka Connect accepts the restart request, the annotation is removed from the KafkaConnector
custom resource.
If you are using KafkaConnector
resources to manage connectors, use the strimzi.io/restart-task
annotation to manually trigger a restart of a connector task.
The Cluster Operator is running.
+Find the name of the KafkaConnector
custom resource that controls the Kafka connector task you want to restart:
kubectl get KafkaConnector
+Find the ID of the task to be restarted from the KafkaConnector
custom resource:
kubectl describe KafkaConnector <kafka_connector_name>
+Task IDs are non-negative integers, starting from 0.
+Use the ID to restart the connector task by annotating the KafkaConnector
resource in Kubernetes:
kubectl annotate KafkaConnector <kafka_connector_name> strimzi.io/restart-task=0
+In this example, task 0
is restarted.
Wait for the next reconciliation to occur (every two minutes by default).
+The Kafka connector task is restarted, as long as the annotation was detected by the reconciliation process.
+When Kafka Connect accepts the restart request, the annotation is removed from the KafkaConnector
custom resource.
If you are using KafkaMirrorMaker2
resources to configure internal MirrorMaker connectors, use the state
configuration to either stop or pause a connector.
+In contrast to the paused state, where the connector and tasks remain instantiated, stopping a connector retains only the configuration, with no active processes.
+Stopping a connector from running may be more suitable for longer durations than just pausing.
+While a paused connector is quicker to resume, a stopped connector has the advantages of freeing up memory and resources.
+ Note
+ |
+
+The state configuration replaces the (deprecated) pause configuration in the KafkaMirrorMaker2ConnectorSpec schema, which allows pauses on connectors.
+If you were previously using the pause configuration to pause connectors, we encourage you to transition to using the state configuration only to avoid conflicts.
+ |
+
The Cluster Operator is running.
+Find the name of the KafkaMirrorMaker2
custom resource that controls the MirrorMaker 2 connector you want to pause or stop:
kubectl get KafkaMirrorMaker2
+Edit the KafkaMirrorMaker2
resource to stop or pause the connector.
apiVersion: kafka.strimzi.io/v1beta2
+kind: KafkaMirrorMaker2
+metadata:
+ name: my-mirror-maker2
+spec:
+ version: 3.6.0
+ replicas: 3
+ connectCluster: "my-cluster-target"
+ clusters:
+ # ...
+ mirrors:
+ - sourceCluster: "my-cluster-source"
+ targetCluster: "my-cluster-target"
+ sourceConnector:
+ tasksMax: 10
+ autoRestart:
+ enabled: true
+ state: stopped
+ # ...
+Change the state
configuration to stopped
or paused
.
+The default state for the connector when this property is not set is running
.
Apply the changes to the KafkaMirrorMaker2
configuration.
You can resume the connector by changing state
to running
or removing the configuration.
+ Note
+ |
+
+Alternatively, you can expose the Kafka Connect API and use the stop and pause endpoints to stop a connector from running.
+For example, PUT /connectors/<connector_name>/stop .
+You can then use the resume endpoint to restart it.
+ |
+
Use the strimzi.io/restart-connector
annotation to manually trigger a restart of a MirrorMaker 2 connector.
The Cluster Operator is running.
+Find the name of the KafkaMirrorMaker2
custom resource that controls the Kafka MirrorMaker 2 connector you want to restart:
kubectl get KafkaMirrorMaker2
+Find the name of the Kafka MirrorMaker 2 connector to be restarted from the KafkaMirrorMaker2
custom resource:
kubectl describe KafkaMirrorMaker2 <mirrormaker_cluster_name>
+Use the name of the connector to restart the connector by annotating the KafkaMirrorMaker2
resource in Kubernetes:
kubectl annotate KafkaMirrorMaker2 <mirrormaker_cluster_name> "strimzi.io/restart-connector=<mirrormaker_connector_name>"
+In this example, connector my-connector
in the my-mirror-maker-2
cluster is restarted:
kubectl annotate KafkaMirrorMaker2 my-mirror-maker-2 "strimzi.io/restart-connector=my-connector"
+Wait for the next reconciliation to occur (every two minutes by default).
+The MirrorMaker 2 connector is restarted, as long as the annotation was detected by the reconciliation process.
+When MirrorMaker 2 accepts the request, the annotation is removed from the KafkaMirrorMaker2
custom resource.
Use the strimzi.io/restart-connector-task
annotation to manually trigger a restart of a MirrorMaker 2 connector.
The Cluster Operator is running.
+Find the name of the KafkaMirrorMaker2
custom resource that controls the MirrorMaker 2 connector task you want to restart:
kubectl get KafkaMirrorMaker2
+Find the name of the connector and the ID of the task to be restarted from the KafkaMirrorMaker2
custom resource:
kubectl describe KafkaMirrorMaker2 <mirrormaker_cluster_name>
+Task IDs are non-negative integers, starting from 0.
+Use the name and ID to restart the connector task by annotating the KafkaMirrorMaker2
resource in Kubernetes:
kubectl annotate KafkaMirrorMaker2 <mirrormaker_cluster_name> "strimzi.io/restart-connector-task=<mirrormaker_connector_name>:<task_id>"
+In this example, task 0
for connector my-connector
in the my-mirror-maker-2
cluster is restarted:
kubectl annotate KafkaMirrorMaker2 my-mirror-maker-2 "strimzi.io/restart-connector-task=my-connector:0"
+Wait for the next reconciliation to occur (every two minutes by default).
+The MirrorMaker 2 connector task is restarted, as long as the annotation was detected by the reconciliation process.
+When MirrorMaker 2 accepts the request, the annotation is removed from the KafkaMirrorMaker2
custom resource.
This procedure describes how to manually trigger a restart of a Kafka MirrorMaker 2 connector by using a Kubernetes annotation.
-The Cluster Operator is running.
-Find the name of the KafkaMirrorMaker2
custom resource that controls the Kafka MirrorMaker 2 connector you want to restart:
kubectl get KafkaMirrorMaker2
-Find the name of the Kafka MirrorMaker 2 connector to be restarted from the KafkaMirrorMaker2
custom resource.
kubectl describe KafkaMirrorMaker2 KAFKAMIRRORMAKER-2-NAME
-To restart the connector, annotate the KafkaMirrorMaker2
resource in Kubernetes.
-In this example, kubectl annotate
restarts a connector named my-source->my-target.MirrorSourceConnector
:
kubectl annotate KafkaMirrorMaker2 KAFKAMIRRORMAKER-2-NAME "strimzi.io/restart-connector=my-source->my-target.MirrorSourceConnector"
-Wait for the next reconciliation to occur (every two minutes by default).
-The Kafka MirrorMaker 2 connector is restarted, as long as the annotation was detected by the reconciliation process.
-When the restart request is accepted, the annotation is removed from the KafkaMirrorMaker2
custom resource.
This procedure describes how to manually trigger a restart of a Kafka MirrorMaker 2 connector task by using a Kubernetes annotation.
-The Cluster Operator is running.
-Find the name of the KafkaMirrorMaker2
custom resource that controls the Kafka MirrorMaker 2 connector you want to restart:
kubectl get KafkaMirrorMaker2
-Find the name of the Kafka MirrorMaker 2 connector and the ID of the task to be restarted from the KafkaMirrorMaker2
custom resource.
-Task IDs are non-negative integers, starting from 0.
kubectl describe KafkaMirrorMaker2 KAFKAMIRRORMAKER-2-NAME
-To restart the connector task, annotate the KafkaMirrorMaker2
resource in Kubernetes.
-In this example, kubectl annotate
restarts task 0 of a connector named my-source->my-target.MirrorSourceConnector
:
kubectl annotate KafkaMirrorMaker2 KAFKAMIRRORMAKER-2-NAME "strimzi.io/restart-connector-task=my-source->my-target.MirrorSourceConnector:0"
-Wait for the next reconciliation to occur (every two minutes by default).
-The Kafka MirrorMaker 2 connector task is restarted, as long as the annotation was detected by the reconciliation process.
-When the restart task request is accepted, the annotation is removed from the KafkaMirrorMaker2
custom resource.
You can recover a Kafka cluster from persistent volumes (PVs) if they are still present.
Recovery from namespace deletion is possible because of the relationship between persistent volumes and namespaces.
A PersistentVolume
(PV) is a storage resource that lives outside of a namespace.
@@ -36719,14 +36917,14 @@
When a cluster is lost, you can use the data from disks/volumes to recover the cluster if they were preserved within the infrastructure. The recovery procedure is the same as with namespace deletion, assuming PVs can be recovered and they were created manually.
This procedure describes how to recover a deleted cluster from persistent volumes (PVs).
You can uninstall Strimzi using the CLI or by unsubscribing from OperatorHub.io.
This procedure describes how to use the kubectl
command-line tool to uninstall Strimzi and remove resources related to the deployment.
This procedure describes how to uninstall Strimzi from OperatorHub.io and remove resources related to the deployment.