scalability – Design of a a ‘cronjob’ microservice at scale

This is not related to any programming language but just a design question ,

I need to design a microservice that should run every x min (no event driven here) , get data from an API , do some processing , and store the result into a database , i would like to run this microservice with multiple instances to avoid service interuption if one of these replicas is Down , but i need to avoid data duplication at the same time (only one replicas run at once) , the microservice will run as a deoloyment on kubernetes, how can i please achieve that ?

Many thanx in advance