This repository contains sources for a related medium.com article with more details. It demonstrates how to set resources for Kubernetes workloads."
There are scripts, NodeJS code and yaml files in this repository. Before running this, your should read the article and inspect the sources.