Automate deletion of indices

Hello

What's the best way to automate the deletion of the indices on elasticsearch 5?

For example, deleting indices older than 5 days.

I know in version 2, curator was the recommended option.

Cheers
Jinal

Same. Use curator