Delete Confluent Platform Deloyment

This topic describes the steps to shut down a Confluent for Kubernetes (CFK) deployment.

The components and resources must be deleted in the specified order.

  1. Check which of the CFK resources were deployed and locate their CRs:

    kubectl get confluent --namespace <namespace>
    

    An example output is:

    NAME                                        REPLICAS   READY   STATUS    AGE
    zookeeper.platform.confluent.io/zookeeper   3          3       RUNNING   23h
    
    NAME                                        REPLICAS   READY   STATUS    AGE
    kafka.platform.confluent.io/kafka           3          3       RUNNING   23h
    
    NAME                                        REPLICAS   READY   STATUS    AGE
    connect.platform.confluent.io/connect       2          2       RUNNING   23h
    
    NAME                                                AGE
    kafkarestclass.platform.confluent.io/krc-cfk-mtls   24h
    
  2. Delete the application custom resources (CRs).

    The CFK application resources include the following:

    • ClusterLink
    • ConfluentRolebinding
    • Connector
    • KafkaTopic
    • SchemaExporter
    • Schema
    • KafkaRestClass

    Delete the resources with one of the following commands.

    • Using the CR file:

      kubectl delete -f <application CR> --namespace <namespace>
      
    • Using the resource name from Step 1:

      kubectl delete <resource name> --namespace <namespace>
      

      For example:

      kubectl delete kafkarestclass.platform.confluent.io/krc-cfk-mtls --namespace <namespace>
      
  3. Delete the Confluent Platform component CRs, excluding Kafka and ZooKeeper.

    The CFK component resources include the following:

    • Connect
    • ControlCenter
    • KafkaRestProxy
    • KsqlDB
    • SchemaRegistry

    Delete the resources with one of the following commands.

    • Using the CR file:

      kubectl delete -f <component CR> --namespace <namespace>
      
    • Using the resource name from Step 1:

      kubectl delete <resource name> --namespace <namespace>
      

      For example:

      kubectl delete connect.platform.confluent.io/connect --namespace <namespace>
      
  4. Delete Kafka:

    kubectl delete -f <Kafka CR> --namespace <namespace>
    

    or

    kubectl delete <Kafka resource name> --namespace <namespace>
    
  5. Delete ZooKeeper:

    kubectl delete -f <Zookeeper CR> --namespace <namespace>
    

    or

    kubectl delete <Zookeeper resource name> --namespace <namespace>
    
  6. Delete the CFK:

    1. Check the release name of your CFK:

      helm ls --namespace <namespace>
      
    2. Using the release name you retrieved in the previous step, delete the CFK:

      helm delete <CFK release name> --namespace <namespace>
      
  7. Delete the namespace:

    kubectl delete namespace <namespace>