Robin provides an in-built chargeback utility which allows one to track the usage and cost of the resources utilized by Robin Bundle applications and non-Robin Bundle applications on a deployed Robin cluster regardless of environment.
You need to start the metrics to enable the chargeback feature for non-Robin Bundle applications.
The following are the resources whose usage and cost are tracked:
Multi-instance GPU (MIG)
Storage space (HDD, SSD)
HugePages for non-Robin Bundle application only
SR-IOV for non-Robin Bundle application only
FPGA devices for non-Robin Bundle application only
PCI devices for non-Robin Bundle application only
Following non-guaranteed Pods for Robin Bundle application only:
Robin hook Pods
Application health Pods
Application Pre-create Pods
Application Post-create Pods,
Application Pre-destroy Pods
Application Post-destroy Pods and so on
This cost visibility and insight into resource consumption not only encourages accountability among application owners but also enables cluster administrators to make better decisions about resource requirements and priorities with regards to their Robin cluster. This in turn improves the meaningful utilization of resources on a Robin Cluster.
The chargeback counters for each of the aforementioned resources are initially started when an application is successfully created and its requested resources are allocated. In addition the following situations could also result in a counter (re)starting:
Individual pod is created
Application or individual pod is (re)started
Failed pod is successfully redeployed (either manually or via Autopilot)
On the other hand counters for an application and its associated resources are stopped when the application is deleted. In addition the following situations could also result in a counter being stopped:
Individual pod is deleted or removed
Application or individual pod is stopped
Redeployment of pod fails (when it initially was in a good state)
When you stop an application, you will still be billed for the storage bound to it. For an existing resource, when there is a change in the price of the resource from the previous price, the billing and price estimate is calculated using the old price until the resource is online.
The above scenarios cover all of the operations on an application that could result in a change of resource utilization. These include: scaling an application in/out horizontally, scaling an application up/down vertically, rolling an application back and adding a new volume to an application.
Separate counters are maintained for every combination of pod and resource tracked.
16.1. Points to be considered for the non-Robin Bundle apps¶
After deploying Helm apps, it might take up to 50 minutes to reflect the Pod resource usage in the chargeback report. To see the details immediately, you must run the
robin chargeback report --ondemand --detailscommand.
When metrics are started, Prometheus and the
chargeback_track_k8s_resusageconfig variable are automatically enabled.
When either the Prometheus is disabled or the
chargeback_track_k8s_resusageconfig variable is set to false, the resource usage for the non-Robin Bundle applications cannot be tracked.
chargeback_skip_track_k8s_resusage_namespacesconfig variable is used to skip the track of resource usage based on the namespace. When you add any namespace to this config variable, the resource usage of that namespace is not tracked.
Sync_k8s_apps_usagesschedule is used to update the resource usage to the Robin database using Prometheus every 24 hours.
Sync_k8s_appsschedule is used to add the details of missed Pods that is added or deleted, to the Robin database every 10 min.
Topics covered in this chapter:
View and manipulate the prices enforced by chargeback counters
View chargeback report
View list of resources tracked as part of chargeback
View information on a resource tracked as part of chargeback