Pipeline step guaranteed to run regardless of errors

In our piepline we have several steps ran across several stages. Some of them may fail (accepted when i.e. create something k8s which already exists) and we don’t care about those errors.
But regardless of any failures or errors we need to clean up created resources after - is there any way I can specify some task/job which will always run as the last one where I can put housekeeping steps ?