Resource Requests and Limits

Managing Resources for Ondat containers

Kubernetes resource requests and limits are two optional Pod properties that allow you to specify how much of a resource a container in a Pod needs or can use. They are two main resources that you can specify requests and limits for, CPU and Memory.

As Ondat is an infrastructure component, the health of other applications depends on being able to write to the Ondat volumes. As such it is of paramount importance to avoid restarts of the Ondat DaemonSet Pods. Restarting a Ondat Pod results in the volumes of the node the Ondat Pod is running on being marked as Read Only, and causes the failover of primary volumes on that node to their replicas. After a Ondat Pod restart, once the Ondat DaemonSet Pod is “READY”, the application Pods running on the node need to be restarted in order to trigger a mount of the filesystem hosted on the Ondat volume and resume normal operations. To avoid restarts of the Ondat main container by Kubernetes due to resource limits being reached, it is recommended to not set resource limits on the Ondat DaemonSet. In addition to avoiding resource limits, Ondat uses a high priority class when the DaemonSet is installed in the ‘kube-system’ namespace. That avoids the DaemonSet Pods of being evicted.

For more information about managing resources for containers please see the Kubernetes documentation

Defining Pod resource requests and reservations

To add resource requests and reservations to the Ondat DaemonSet configure them in the StorageOSCluster resource.