Clean Up

Steps to perform a clean up of all deployments, services, and volumes.

  1. Remove the entire cluster

The deployment of the ThreatLockDown cluster of managers involves the use of different StatefulSet elements as well as configuration maps and services.

To delete your ThreatLockDown cluster, just execute the following command from this repository directory.

  • EKS cluster

    $ kubectl delete -k envs/eks/
    
  • Other cluster types

    $ kubectl delete -k envs/local-env/
    

This will remove every resource defined on the kustomization.yml file.

  1. Remove the persistent volumes.

    $ kubectl get persistentvolume
    
    NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS        CLAIM                                                         STORAGECLASS             REASON    AGE
    pvc-024466da-f7c5-11e8-b9b8-022ada63b4ac   10Gi       RWO            Retain           Released      wazuh/wazuh-manager-worker-wazuh-manager-worker-1-0           gp2-encrypted-retained             6d
    pvc-b3226ad3-f7c4-11e8-b9b8-022ada63b4ac   30Gi       RWO            Retain           Bound         wazuh/wazuh-indexer-wazuh-indexer-0                           gp2-encrypted-retained             6d
    pvc-fb821971-f7c4-11e8-b9b8-022ada63b4ac   10Gi       RWO            Retain           Released      wazuh/wazuh-manager-master-wazuh-manager-master-0             gp2-encrypted-retained             6d
    pvc-ffe7bf66-f7c4-11e8-b9b8-022ada63b4ac   10Gi       RWO            Retain           Released      wazuh/wazuh-manager-worker-wazuh-manager-worker-0-0           gp2-encrypted-retained             6d
    
    $ kubectl delete persistentvolume pvc-b3226ad3-f7c4-11e8-b9b8-022ada63b4ac
    

    Repeat the kubectl delete command to delete all ThreatLockDown related persistent volumes.

Warning

Do not forget to delete the volumes manually where necessary.