Module 1: On-prem

  1. Stop the consumer group app to stop consuming from topic wikipedia.parsed. Note that the command below stops the consumers gracefully with kill -15, so the consumers follow the shutdown sequence.

  2. Stop the Docker environment, destroy all components and clear all Docker volumes.


Module 2: Confluent Cloud

If you ran the Module 2: Hybrid Deployment to Confluent Cloud Tutorial portion of this tutorial, which included creating resources in Confluent Cloud, follow the clean up procedure below to avoid unexpected Confluent Cloud charges.

Any Confluent Cloud example uses real Confluent Cloud resources. After you are done running a Confluent Cloud example, manually verify that all Confluent Cloud resources are destroyed to avoid unexpected charges.

  1. If the on-prem cluster is still running, remove the Replicator connector that was replicating data to Confluent Cloud.

    docker-compose exec connect curl -X DELETE \
      --cert /etc/kafka/secrets/connect.certificate.pem \
      --key /etc/kafka/secrets/connect.key \
      --tlsv1.2 \
      --cacert /etc/kafka/secrets/snakeoil-ca-1.crt \
      -u connectorSubmitter:connectorSubmitter \
  2. If the on-prem cluster is still running, disable Telemetry Reporter in both Kafka brokers.

    docker-compose exec kafka1 kafka-configs \
      --bootstrap-server kafka1:12091 \
      --alter \
      --entity-type brokers \
      --entity-default \
      --delete-config confluent.telemetry.enabled,confluent.telemetry.api.key,confluent.telemetry.api.secret
  3. Delete the Cloud API key.

    ccloud api-key delete ${METRICS_API_KEY}
  4. Destroy your Confluent Cloud environment. Even if you stop cp-demo, the resources in Confluent Cloud continue to incur charges until you destroy all the resources.

    source ./ccloud_library.sh
    source delta_configs/env.delta
    ccloud::destroy_ccloud_stack $SERVICE_ACCOUNT_ID
  5. Log into Confluent Cloud UI and verify all your resources have been destroyed. Note that the Hosted monitoring cluster will be shown in the Confluent Cloud UI until it ages out.