Mass restarting of pods in aws eks in multiple cluster (we have app running in 100's of eks clusters in different accounts)

Asking for help? Comment out what you need so we can get more information to help you!

Cluster information:

Kubernetes version: 1.18
Cloud being used: aws eks
Installation method: terraform
Host OS: amazon linux
CNI and version:
CRI and version:

Hi Team,

I need the best solution for my requirement. we are running our app hosted on aws eks in multiple aws accounts(more than 100’s). sometimes we have to restart multiple pods in different accounts. do we have any automation or tools which we can use. as of now we are doing it manually by logging into each and every cluster account to restart pods. this is consuming our hours of time.

please suggest me any tools or any idea where i can automate this process to restart the pods in multiple aws accounts.

Thanks in advance,

Regards,
Manoj.

I don’t really have a clean solution but it looks like you need all of the kubeconfigs of all the EKS clusters running on several AWS accounts that you are managing in order to create a script that will run a loop that changes context accordingly and applies kubectl rollout restart deployment <app name> against every single cluster.

To understand your problem better I need to know why exactly does your app need to be restarted and how often. Another solution might be to investigate what multi-cluster management options exist for AWS and if there is a cleaner way to accomplish what you wish for. It might be worth your time investigating about Cluster API.