To use pods to maximize utilization of node resources instead of using that node as VM

Use case:
I run tests on VMs of having 6GB RAM and 4 core processors . I found that during test run load average never crosses 0.4 or 0.5 so that means my test can run lesser core and on lesser RAM so I thought why not create a pod with after setting some service and request limit for CPU and RAM and set number of pods limit for a node and try to squeeze in as many as many pods I can irrespective of node size considering I do not overdo it which led to memory leak or killing of container.

Doubt:
Is this doable ?.I need pod to run tests and not to launch any webapp or load balance any application.I just want to increase utilization of VM so that I can save money and run more tests in parallel rather than on multiple VMs of average size and getting charged for all.I will be getting instance from Cloud so I can assign lower size VM to cater my needs but I am looking for generic solution where I can fit in more pods in VM of any size as Kubernetes cluster by just modifying some param based on size of VM I get.

Thanks for reading it.Please suggest.

Kindly suggest.

Have you tested it out? This document explains managing resources for containers. Keep in mind the resources are enforced by the container runtime and the behavior may vary there.

Oh and there’s a max pod limit per node. It’s a kublet setting (--max-pods).

There is also considerations for IP address limitations to consider as well. IP allocation is finite.