Home > Workload Solutions > SQL Server > White Papers > SQL Server 2019 Containers on Linux > Step 8: Clean up the environment
The final step in our journey is to show the ease of removing the containers and storage. Two XtremIO X2 options—the retain policy and the delete policy—are available for users who have completed working with their volumes.
The retain policy enables the user to detach the container from storage but retain the persistent volume so that the storage can be attached to other containers. To enable this functionality, which is not the default behavior, the cluster administrator must configure StorageClass, as shown in the following example:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: csi-xtremio-qos-sc-high
provisioner: csi-xtremio.dellemc.com
reclaimPolicy: Retain
parameters
qos_policy_id: “QoS_High”
If the storage is not required but StorageClass is configured so that reclaimPolicy is set to Retain, the XtremIO X2 LUNs can be manually removed.
The delete policy enables the container to be detached from storage and the associated storage LUN to be removed from the XtremIO X2 array. The delete policy is the default behavior and removes all associated storage. For databases and other applications that require persistent storage, developers and others should work with the cluster administrator to understand if the associated storage is going to be retained or deleted and make any needed changes. In this case, our technical writer does not have to retain a copy of the AdventureWorks database and so uses the delete policy, as shown in the following figure:
Figure 17. Technical writer removing SQL Server pod in Kubernetes