Managing Red Hat OpenShift Connectors instances

Guide
  • Red Hat OpenShift Connectors 1
  • Updated 04 March 2023
  • Published 26 September 2022

Managing Red Hat OpenShift Connectors instances

Guide
Red Hat OpenShift Connectors 1
  • Updated 04 March 2023
  • Published 26 September 2022

As a developer of applications and services, you can use Red Hat OpenShift Connectors to create and configure connections between Red Hat OpenShift Streams for Apache Kafka and third-party systems. After you create Connectors instances, you can start, stop, duplicate, and delete them.

Creating a Connectors instance

You can create a source connector to send data from an external system to OpenShift Streams for Apache Kafka. You can create a sink connector to send data from OpenShift Streams for Apache Kafka to an external system.

Prerequisites
  • Complete the Getting started with Red Hat OpenShift Streams for Apache Kafka quick start to set up the following components:

    • A Kafka instance that you can use for OpenShift Connectors.

    • A Kafka topic to store messages sent by data sources and make the messages available to data sinks.

    • A service account that allows you to connect and authenticate your Connectors instances with your Kafka instance.

    • Access rules for the service account that defines how your Connectors instances can access and use the topics in your Kafka instance.

  • Log in to the Red Hat OpenShift Connectors web console at https://console.redhat.com/application-services/connectors/.

Procedure
  1. In the Red Hat OpenShift Connectors web console, click Create Connectors instance.

    You can filter the list of connectors by sink or source and you can search for a connector type by name.

  2. Select the type of connector that you want to create and then click Next.

  3. Select the OpenShift Streams for Apache Kafka instance for the connector to work with.

  4. On the Deployment page, the namespace that you select depends on your OpenShift environment. The namespace is the deployment space that hosts your Connectors instances.

    If you’re using your own OpenShift Dedicated environment, select the card for the namespace that was created when you added the Connectors service to your cluster.

    If you’re using the hosted preview environment, click Create preview namespace to provision a namespace for hosting the Connectors instances that you create.

  5. Click Next.

  6. Provide the core configuration for your connector:

    1. Type a unique name for the connector.

    2. Type the Client ID and Client Secret of the service account that you created for Connectors and then click Next.

  7. Provide the connector-specific configuration for your Connectors instance.

  8. Optionally, configure the error handling policy for your Connectors instance.

    The options are:

    • stop: The Connectors instance shuts down when it encounters an error.

    • log: The Connectors instance sends errors to its log.

    • dead letter queue: The Connectors instance sends messages that it cannot handle to a dead letter topic that you define for the Connectors Kafka instance.

  9. Click Next.

  10. Review the summary of the configuration properties and then click Create Connectors instance.

    Your Connectors instance is listed in the table of Connectors.

    After a couple of seconds, the status of your Connectors instance changes to the Ready state.

Starting and stopping a Connectors instance

After you create a Connectors instance, it starts retrieving data (if it is a source connector) or sending data (if it is a sink connector). Optionally, you can stop and then restart a Connectors instance.

Procedure

To stop a running Connectors instance:

  1. In the OpenShift Application Services web console, select Connectors > Connectors Instances.

  2. From the list of Connectors instances, find the name of the connector that you want to delete.

  3. Click the three vertical dots and then select Stop instance.

    The status of the Connectors instance changes to Stopped.

To start a Connectors instance:

  1. In the OpenShift Application Services web console, select Connectors > Connectors Instances.

  2. From the list of Connectors instances, find the name of the connector that you want to delete.

  3. Click the three vertical dots and then select Start instance.

    The status of the Connectors instance changes to Ready.

Duplicating a Connectors instance

For the hosted preview environment, your Connectors namespace (that hosts your Connectors instances) expires 48 hours after you create the Connectors namespace. However, if your Kafka instance expires before the Connectors namespace expires, your Connectors instances will go into a failed state. To workaround this failed state, you can create a new Kafka instance and then duplicate your Connectors instances and configure them to use the new Kafka instance.

The hosted preview environment limits you to four Connectors instances at a time, even if the Connectors instances are in an inactive or deleting state. If you can see four Connectors instances in the list of Connectors instances, you have reached your limit and you cannot create (or duplicate) another Connectors instance until you delete one of them.

This limitation does not apply if you are using your own OpenShift environment.

Prerequisites
  • You’re logged in to the OpenShift Application Services web console at https://console.redhat.com/application-services/connectors.

  • Your Connectors namespace is active.

  • You have created a new Kafka instance.

  • You have an existing Connectors instance that you want to duplicate.

  • If you are using the hosted preview environment, verify that you have three or fewer Connectors instances. If you have four, you have reached your limit. You must delete a Connectors instance before you create or duplicate a new one.

Procedure
  1. In the OpenShift Application Services web console, select Connectors > Connectors Instances.

  2. From the list of Connectors instances, find the name of the connector that you want to duplicate.

  3. Click the three vertical dots and then select Duplicate.

  4. Click Next.

  5. Select the new Kafka instance and then click Next.

  6. Select your Connectors namespace and then click Next.

  7. For Core configurations:

    1. Optionally, change the default name of the Connectors instance.

    2. Provide the Client secret for the service account, and then click Next.

  8. Review the Connector-specific configurations, and then click Next.

  9. Review the Error handling policy, and then click Next.

  10. On the Review page, click Create Connectors instance.

    Your new Connectors instance is listed in the table of Connectors. After a couple of seconds, the status of your Connectors instance changes to the Ready state.

Deleting a Connectors instance

If you are using your own OpenShift cluster, and you want to remove the OpenShift Connectors add-on, you should first delete all Connectors Instances.

If you are using the hosted preview environment, you have a limit of four Connectors instances at a time. If you reach your limit, you must delete a Connectors instance before you create or duplicate a new one.

Procedure
  1. In the OpenShift Application Services web console, select Connectors > Connectors Instances.

  2. From the list of Connectors instances, find the name of the connector that you want to delete.

  3. Click the three vertical dots and then select Delete.

  4. In the Delete connector? popup, type the name of the Connectors instance to confirm that you want to delete it and then click Delete.

    The status of the Connectors instance changes to Deleting and then it is removed from the list of Connectors instances.