I have a K8S cluster; In one deployment inside this cluster has a variable in the ConfigMap. This variable contains a list of objects. I want to divide the list of objects and assign the subset to the number of pods in the deployment. The goal is to make it dynamic.
I will give an example to make clear. Let's assume the variable as 9 objects and the deployment has 3 pods. I want to divide the list (9 objects/ 3 pods = 3 objects/pod). So Pod1 has objects 1,2,3; Pod2 has objects 4,5,6; Pod3 has objects 7,8,9.
Note: I'm using Terraform to manage the resources and manage the variables.