Magalix AI collects resources utilization and KPI metrics. It collects CPU, memory, and I/O usage patterns at set intervals. Metrics and behavioral analysis take place at the level of containers, services, and app. Our proprietary algorithms simplify and aggregate these metrics to use them as different features fed into the machine learning models.
While your Kubernetes cluster might work fine without setting resource requests, and limits, Magalix AI won't be able to generate any scalability decisions. In that case, the app dashboard will show the message shown below to alert you to take the necessary action.
Define requests and limits warning
Kubernetes uses the requests & limits apparatuses to control resources such as CPU and memory. Requests are what the container is guaranteed to get. For example, If a container requests a resource, Kubernetes will only schedule it on a node that can give it that resource. Limits, on the other hand, is the resource threshold a container never exceed. The container is only allowed to go up to the limit, and then it is restricted.
To control what requests and limits a container can have, you can set quotas at the Container level and at the Namespace level. If you want to learn more about resources & limits see this reference from the Kubernetes documentation.
To specify a CPU request for a Container, include the resources:requests field in the Container’s resource manifest. Similarly, to specify a CPU limit, include resources:limits. The Container has a CPU request of 0.5 CPU and a CPU limit of 1 CPU. If you want to learn more about CPU requests & limits see this reference from the Kubernetes documentation.
apiVersionv1 kindPod metadata namecpu-demo namespacecpu-example spec containers namecpu-demo-ctr imagevish/stress resources limits cpu"1" requests cpu"0.5" args -cpus "2"
To specify a memory request for a Container, include the resources requests field in the Container’s resource manifest. To specify a memory limit, include resources:limits. The Container has a memory request of 100 MiB and a memory limit of 200 MiB. If you want to learn more about Memory requests & limits see this reference from the Kubernetes documentation.
apiVersionv1 kindPod metadata namememory-demo namespacemem-example spec containers namememory-demo-ctr imagepolinux/stress resources limits memory"200Mi" requests memory"100Mi" command"stress" args"--vm" "1" "--vm-bytes" "150M" "--vm-hang" "1"