Get the peak memory usage in the duration
// instal node 17
bash <(curl -sL https://gist.githubusercontent.com/grieve54706/81e7c6c69b34d92f383ea151b6f28a94/raw/e7edfb4d2ea514142ca045301e090270c3637457/upgrade-node.sh)
// reload env var
K8s has metrics server to provide cpu and memory usage of pods. Default 60 seconds, can be changed using --metric-resolution
flag. Official are not recommending setting values below 15s, as this is the resolution of metrics calculated by Kubelet.(ref1, ref2)
So I create this tool to watch cpu and memory and log peak usage of pods.
// instal node 17
bash <(curl -sL https://gist.githubusercontent.com/grieve54706/acd9c1a411adab38c4f61f2b1497769f/raw/d42e76f3f8a3aaadf3055094df8c7dab3c688e2f/upgrade-node.sh)