Summary
In this chapter, we looked at the cost allocation challenges for containerized workloads, due to the complexity of identifying the in-cluster cost, the external cost, and the shared cost. Container orchestrators such as AKS abstract the inner workings, which makes it impossible to tag all resources with cost centers. The answer to the challenge is Kubecost, an open source, real-time cost visibility and insights tool that provides the needed cost allocation visibility, by running a container inside an AKS cluster and monitoring various container and runtime metrics. We also learned how to configure Kubecost for an existing AKS cluster. Using the cost allocation features of Kubecost, we learned how to use data for showback and chargeback reporting. And finally, we looked at the savings recommendations that Kubecost provides and the actions engineering teams can take to realize the savings.
In the next chapter, we will explore metric-driven cost optimization.