it’s the Kubernetes scheduler that decides which node a pod goes to, the schedular takes on consideration the amount of resources required by a pod and those available on the nodes and identifies the best node to place a pod on.
you can specify the amount of CPU and Memory when you spin up a new pod, to do this in pod-definition.yaml file you can put this under spec
you should add a section called resources
and specify the required resources
you can also specify the limits where your application is not allowed to use more than that limit
you can also create a limitrange resource object
resource quotas
is also another way to create resource limits on namespace level, so a resource quota is a namespace level object