Retention of Deleted Kubernetes Resources using LM Containers
Last updated on 04 April, 2025By default, LM Container deletes resources immediately. If you want to retain resources, you can configure the retention period to delete resources after the set time passes.
Retaining Deleted Kubernetes resources
You must configure the following parameters in the LM Configuration file:
- Navigate to the LM Configuration file and do the following:
- Specify the deleted devices’ retention period in ISO-8601 duration format using the property
kubernetes.resourcedeleteafter
= P1DT0H0M0S.
For more information, see ISO-8601 duration format. lm-container
adds the retention period property to the cluster resource group to set the global retention period for all the resources in the cluster. You can modify this property in the child groups within the cluster group to have different retention periods for various resource types. In addition, you can modify property for a particular resource.
Note: lm-container configures different retention periods for lm-container and Collectorset-Controller Pods for troubleshooting. The retention period for these Pods cannot be modified and is set to 10 days.
- Specify the deleted devices’ retention period in ISO-8601 duration format using the property
- Enter the following parameters in the lm-container-configuration.yaml to set the retention period for the resources:
argus:
lm:
resource:
# To set the global delete duration for resources
globalDeleteAfterDuration: "P0DT0H1M0S" // Adjust this value according to your needs to set the global retention period for resources