Java, Docker and Memory (The 3 Musketeers?)

Deploying a Java application to a PRD environment means knowing what kind of resources it needs to run, but how do you know that a head of time?Sure, its easy to give an application more hardware, but if with the rise of Kubernetes more Java applications are being deployed in Docker containers. Most Kubernetes environments want to know what resources the Java application needs to assist with scheduling and balancing the load across nodes.