I have deployed Amazon CloudWatch Container Insights with Enhanced Observability with EC2 in my eks cluster. Without running kubectl from commandline, I need to to find the status of the pods and the count of each type of pod (number of pods with same name) so that I can raise an alarm whenever the number of pods becomes less than a certain minimum threshhold.

How should I do this? I am not able to find any metrics that gives this number directly. A lambda function that checks the cloudwatch logs might work as well, but not sure what to check in the logs with it.

Could some one help with getting the answer for this if possible with code.

0

There are 0 best solutions below