The cost insights feature helps finance departments analyze resource usage and allocate costs across multiple dimensions. This feature also provides recommendations for cost savings.
The cost insights feature for Alibaba Cloud Container Service (ACS) is currently in preview. To try it, submit a ticket.
Prerequisites
You have an ACS cluster running Kubernetes version 1.26 or later with Internet access enabled.
You have enabled Managed Service for Prometheus for your cluster. For instructions, see Use Managed Service for Prometheus to monitor ACS clusters.
Billing
Cost insights generates basic metrics based on data such as bills and cloud resource prices, and reports these metrics to Managed Service for Prometheus. Modifying the default settings, such as the default retention period, may incur additional fees.
The cost allocation tags feature filters data for cost insights by default. You must enable the cost allocation tags feature in the Expenses and Costs console with the
acs.aliyun.comandacs:acc:cluster_idtags selected to ensure that the cost insights feature can retrieve and analyze your billing data.
Enable cost insights
Log on to the ACS console. In the left-side navigation pane, click Clusters.
On the Clusters page, find the target cluster and click its ID. In the left navigation pane, choose .
Click Authorize. This will automatically create the AliyunCCManagedCostRole, which allows Managed Service for Prometheus to access your billing data.
You can also use the RAM Quick Authorization link and click Authorize.
Install the component.
Follow the on-screen instructions to install the
ack-cost-exportercomponent. Once the installation is complete, you will be automatically redirected to the Cost Insights page.
Disable cost insights
If you no longer need the cost insights feature, you can disable it by uninstalling the ack-cost-exporter component.
Log on to the ACS console. In the left-side navigation pane, click Clusters.
On the Clusters page, find the target cluster and click its ID. In the left navigation pane, choose Operations > Add-ons.
On the Add-ons page, find
ack-cost-exporterand click Uninstall on the card. In the Uninstall dialog box, click OK.
FAQ
What should I do if the ack-cost-exporter component fails to install or uninstall?
If the installation or uninstallation fails, you can manually clean up the component's resources by running the following kubectl delete commands. Then, reinstall the component from the console. For installation details, see Manage components.
kubectl delete deployment ack-cost-exporter -n kube-system
kubectl delete service alibaba-cloud-price-exporter -n kube-system
kubectl delete service alibaba-cloud-billing-exporter -n kube-system
kubectl delete service alibaba-cloud-cost-exporter -n kube-system
kubectl delete ServiceMonitor alibaba-cloud-price-exporter -n kube-system
kubectl delete ServiceMonitor alibaba-cloud-billing-exporter -n kube-system
kubectl delete ServiceMonitor alibaba-cloud-cost-exporter -n kube-system
kubectl delete ClusterRoleBinding ack-cost-exporter-cluster-role-binding
kubectl delete ClusterRoleBinding ack-cost-exporter-cluster-role-binding-v1
kubectl delete ServiceAccount ack-cost-exporter -n kube-system
kubectl delete ClusterRole ack-cost-exporter-cluster-role