Clean Up

This example concludes with deleting the databases and all objects associated with TimesTenClassic. These steps are used for example purposes only. Doing these steps results in the termination of the Pods that are running the TimesTen databases as well as the deletion of the TimesTen databases themselves.

  1. Delete the ConfigMap object. (sample, in this example.)
    % kubectl delete configmap sample
    configmap "sample" deleted
    
  2. Delete the TimesTenClassic object and the underlying objects.
    % kubectl delete -f sample.yaml
    timestenclassic.timesten.oracle.com "sample" deleted
    
  3. Verify the Pods that were running the TimesTen databases no longer exist.
    % kubectl get pods
    NAME                                        READY   STATUS    RESTARTS   AGE
    timesten-operator-5d7dcc7948-8mnz4          1/1     Running   0          5d23h
    
  4. Delete the persistent storage used to hold your databases. You have to do this manually.
    % kubectl get pvc
    NAME                     STATUS   VOLUME
    CAPACITY   ACCESS MODES   STORAGECLASS   AGE
    tt-persistent-sample-0   Bound
    ...
    
    tt-persistent-sample-1   Bound
    ...
    % kubectl delete pvc tt-persistent-sample-0
    persistentvolumeclaim "tt-persistent-sample-0" deleted
    % kubectl delete pvc tt-persistent-sample-1
    persistentvolumeclaim "tt-persistent-sample-1" deleted
    
  5. If you no longer want to run the Operator, you can stop it. Navigate to the /deploy directory (kube_files/deploy, in this example) and use the kubectl delete command to stop the operator.
    % cd kube_files/deploy
    % kubectl delete -f operator.yaml
    deployment.apps "timesten-operator" deleted