A memory limit is not the same as available memory(at least in docker, not sure about k8s, but I assume it is the same).
To limit mongod wiredtiger cache size, specifically set it in the configuration or via command line arguments.
If you run
mongodin a container (e.g.lxc,cgroups, Docker, etc.) that does not have access to all of the RAM available in a system, you must setstorage.wiredTiger.engineConfig.cacheSizeGBto a value less than the amount of RAM available in the container. The exact amount depends on the other processes running in the container. SeememLimitMB.