Sitemap

KubeCost- A Unified Cloud-FinOps Tool

--

Kubernetes Cost Monitoring and Management Tool

Press enter or click to view image in full size

In Cloud’s Chronology, Kubernetes is most widely used container orchestrator to deploy microservices. In its ecosystem, maintainence is quite challenging, Though numerous companies are grappling every day to quantify/monitor cost utilization for their running clusters. Because 99.99% uptime or High Availability of clusters is bit costly.

How to Quantify K8s Usage Cost

If we could know how much we spend cloud resources? Can we bifurcate the usage cost based on different K8s objects such as services, namespaces, pods, container etc and other groups? Is KUBECOST is answer to those questions?

Kubecost

Kubecost is a cost monitoring and management tool which helps us to quantify the K8s usage cost in our cluster. It comes with real-time cost visibility which helps our teams to track, manage and lower spend. It is available in both edition Community as well as Enterprise. Enterprise Edition has added features such as report saving, user auth, sso, long metrics retention, enterprise support.

Press enter or click to view image in full size
Kubecost Overview Dashboard

Kubecost Features

Kubecost Standard Edition provides real-time cost monitoring and valuable information for teams using Kubernetes, which helps us to lower or reduce cost spend by looking at under and over-utilised resources.

  • Cost Allocation: Bifurcate Costs based on different Kubernetes objects such as deployment, service, namespace label, and more. Visualize cost usage of multiple clusters in a single plane.
  • Unified cost monitoring: Cost Usage of K8s workloads and other clouds can be unified with complete cloud service billing integration.
  • Optimization Insights: Offers dynamic recommendation to lower cloud spend based on workload behaviour patterns.
  • Alerts & Governance: Offers highly reliable and high performance application with dynamic alerts, Quickly scrap cost threshold overruns and infrastructure outage breach before they would become a problem with real-time notifications.

Kubecost Installation

Steps will walk you through installing Kubecost into your K8s cluster. The Official Kubecost helm chart contains all neccessary dependencies to setup kubecost in just few mins.

Before you Begin

> Install Kubecost via Helm-Chart

Below commands will also install Prometheus, Grafana, and kube-state-metrics in the namespace supplied. You can view install config options here.

kubectl create namespace kubecost
helm repo add kubecost https://kubecost.github.io/cost-analyzer/
helm install kubecost kubecost/cost-analyzer --namespace kubecost --set kubecostToken="<TYPE API-TOKEN>"

Ensure all the Pods are up and running in kubecost namespace:

$ kubectl get pods -n kubecost
NAME READY STATUS RESTARTS AGE
kubecost-cost-analyzer-7d79c58cbf-tgc6x 2/2 Running 4 (47h ago) 11d
kubecost-grafana-5dff8c6847-vzv6k 2/2 Running 2 (47h ago) 11d
kubecost-kube-state-metrics-f7896dcdd-wgw62 1/1 Running 2 (47h ago) 11d
kubecost-prometheus-node-exporter-89j9x 1/1 Running 2 (47h ago) 11d
kubecost-prometheus-server-77bd8b8d6f-thw9x 2/2 Running 4 (47h ago) 11d

$ kubectl port-forward --namespace kubecost deployment/kubecost-cost-analyzer 9090

For Installation Issues Please refer

You can now access Kubecost UI at your browser by point http://<ip_address>:9090.

You can navigate to Kubecost UI to view cost usage allocations, Assests, Saving Insights, Generate Report and more.

Allocations:

You can select “Allocations” from left pane of Kubecost UI which will show us Cost Utilization on the basis aggregated namespace,container,deployment,pod,service etc. along with “Date Range” to filter out utilization in given time range.

Following Screenshot shows sample allocation overview:

Press enter or click to view image in full size

Savings:

You can select “Savings” from left pane of Kubecost UI to check under-utilised resources to reduce cost. It provides insights of over-utilised and under-utilised resources(nodes,pods,volume etc).

Following Screenshot shows sample Savings overview:

Press enter or click to view image in full size

Health:

You can select “Health” from Kubecost UI to check Cluster Health Status

Following Screenshot shows sample Health overview:

Press enter or click to view image in full size

Report:

Select “Report” from Kubecost Dashboard to create report for Assets and Allocations aggregated based on K8s object in given time range.

Following Screenshot shows sample Report overview:

Press enter or click to view image in full size

Alerts:

Select “Alerts” from Kubecost Dashboard to create alert to receive updates on realtime K8s Cluster spend, monitor K8s health, monitor Kubecost health etc. It is further integrated with Slack and Pagerduty to notify teams to take apt actions.

Following Screenshot shows sample Alerts overview:

Press enter or click to view image in full size

Conclusion:

It is not the end because there many other advance features which are still not yet used, Because everything can’t be covered in single article i.e. You can play with custom report, custom alert for budget over-run based on namespace, service etc. For more detail Please refer below link

--

--