Kubernetes version: 1.16
Cloud being used: Bare Metal
Here is the problem I am trying to solve in K8 version 1.16. I have a namespace in K8, which has a hard limit (say 5 GB). The namespace itself has made reservations for 3 GB on memory. In the namespace, I have a few containers. The sum of all the memory requests from these containers adds up to 3 GB.
I want to get an email every time a container overshoots its memory requirements. And anytime the namespace memory requests go beyond 3GB, I need to know the offending containers that have gone beyond their memory requirements.
Since the hard limit is 5GB (and beyond the namespace requirements), I see the offending containers performing with no penalties.
How do I go about solving this problem in K8? K8 documentation is vague on this aspect (in fact K8 says, the containers will be allowed to run if there is memory on the nodes)