SlideShare a Scribd company logo
Kubernetes Cloud Cost
Monitoring with OpenCost &
Optimization Strategies
Matt Ray
Senior Community Manager for OpenCost
mattray@kubecost.com
SCaLE 20x
Who am I?
Matt Ray
• Senior Community Manager for OpenCost at Kubecost.
• Co-host of the Software Defined Talk podcast for 8+ years.
• Living in Sydney, Australia for 6+ years after relocating from
Austin, Texas.
• Active in Open Source for much, much longer.
• mattray@kubecost.com
• https://www.linkedin.com/in/mhray/
• @mattray on GitHub, Mastodon, too many Slacks
The complexity of operating Kubernetes
efficiently is real
3
Technical
COMPLEXITY
Metal
VMs
K8s
Higher-level abstractions, more shared
resources, and increasingly dynamic
Behavioral
COMPLEXITY
Decentralized releases means any
engineer can increase spend quickly
Abstraction
Any engineer Any org Any time
$
$
$
$
$
$
OpenCost
Specification and Implementation
Cloud Native Computing Foundation Sandbox Project
FinOps Certified Solution
• https://opencost.io
• https://github.com/opencost
• https://www.cncf.io/projects/opencost/
Open source Kubernetes cost monitoring
OpenCost Specification
• Adobe
• Armory
• AWS
• D2IQ
• Google Cloud
• Kubecost
• Mindcurv
• New Relic
• Pixie
• Red Hat
• SUSE
Created by a community of Kubernetes practitioners
https://github.com/opencost/opencost/blob/develop/spec/opencost-specv01.md
OpenCost Specification
https://github.com/opencost/opencost/blob/develop/spec/opencost-specv01.md
Kubernetes workloads are often transient and vary in the resources they consume.
How do we measure who is responsible for what and how much?
• Management fees
• Expenses from nodes
• Persistent volumes
• Attached disks
• Load balancers
• Network ingress/egress
Total Cluster Costs
=
Total Cluster Costs = Cluster Asset Costs + Cluster Overhead Costs
Total Cluster Costs
Cluster Asset Costs
Cluster Overhead Costs
Cluster Asset Costs
Cluster Asset Costs = Resource Allocation Costs + Resource Usage Costs
=
Total Cluster Costs
Cluster Asset Costs
Cluster Overhead Costs
Resource
Allocation
Costs
Resource
Usage
Costs
Cluster Overhead Costs
Cluster Asset Costs: Node Costs
Cluster Asset Costs = Resource Allocation Costs + Resource Usage Costs
=
Total Cluster Costs
Resource
Allocation
Costs
Resource
Usage
Costs
Cluster Overhead Costs
Network
Egress
Cluster Management Fees
Persistent
Volume
Load
Balancer
Node (CPU,
RAM, GPU)
We've got the cost of our
Kubernetes assets
Now let's distribute them across Workloads
Workload Costs
Inside the Kubernetes Cluster
What is Measured
• CPU
• Memory
• GPU
• Storage Volume
• Load Balancer
Aggregations
• Container
• Pod
• Deployment
• StatefulSet
• Job
• Controller Name
• Controller Kind
• Label
• Annotation
• Namespace
• Node
• Cluster
Workload Costs + Cluster Idle Costs
Total Cluster Costs = Workloads + Cluster Idle Costs + Cluster Overhead Costs
=
Total Cluster Costs
Resource
Allocation
Costs
Resource
Usage
Costs
Cluster Overhead Costs
Total Cluster Costs
Workload Costs
Cluster Overhead Costs
Cluster
Idle
Costs
Workload Costs + Cluster Idle Costs
Total Cluster Costs = Workloads + Cluster Idle Costs + Cluster Overhead Costs
=
Total Cluster Costs
Resource
Allocation
Costs
Resource
Usage
Costs
Cluster Overhead Costs
Workload Costs
Cluster Overhead Costs
Cluster
Idle
Costs
Workload Costs + Cluster Idle Costs
Total Cluster Costs = Workloads + Cluster Idle Costs + Cluster Overhead Costs
=
Total Cluster Costs
Resource
Allocation
Costs
Resource
Usage
Costs
Cluster Overhead Costs
Cluster
Idle
Costs
Allocated
Costs
Cluster Overhead Costs
Usage
Costs
Cluster Idle Cost
Idle costs can be calculated at the Asset/Resource and at the Workload level.
Cluster Idle Cost = Cluster Asset Costs – Workload Costs
Allocated Idle
Total CPU Capacity
I understand what we're
measuring
How do I get at the metrics?
OpenCost Architecture
OpenCost
Deploying OpenCost
https://www.opencost.io/docs/install
Prometheus
• Prom community Helm chart the default
OpenCost Manifest
• kubectl apply --namespace opencost -f
https://raw.githubusercontent.com/opencost/opencost/develop/kubernetes/opencost.yaml
OpenCost Helm Chart
• https://github.com/opencost/opencost-helm-chart/
• Configurable settings (Prometheus, namespaces, etc.)
Accessing OpenCost
• API
• Web UI
• kubectl cost
• Prometheus
SCaLE 20X: Kubernetes Cloud Cost Monitoring with OpenCost & Optimization Strategies
What's the Future of
OpenCost?
What's the Future of
OpenCost?
What do you want it to be?
Near-Term Roadmap
• External Asset Costs
• Backstage integration
• More Clouds
• More Documentation
• More Integrations
Get Involved with OpenCost
https://www.opencost.io
Slack
• https://slack.cncf.io/ #opencost
GitHub
• https://github.com/opencost/opencost
• https://github.com/opencost/opencost-helm-chart
• https://github.com/opencost/opencost-website
OpenCost Working Group
• https://bit.ly/opencost-calendar
• https://bit.ly/opencost-meeting
LinkedIn
• https://www.linkedin.com/showcase/opencost/
Kubernetes Optimization
Strategies
We've got the numbers, now what do we do?
FinOps
https://finops.org
The FinOps Foundation provides guidance on
cloud financial management through best
practices, education, and standards.
Establish a FinOps practice within your
organization.
27
Domains
Personas
FinOps Practitioner
Executive
Business/Product Owner
Finance/Procurement
Engineering/Operations
Principles
▸ Teams need to collaborate
▸ Everyone takes ownership for their
cloud usage
▸ A centralized team drives FinOps
▸ Reports should be accessible
and timely
▸ Decisions are driven by business
value of cloud
▸ Take advantage of the variable cost
model of the cloud
Understanding
Cloud Usage
and Cost
Performance
Tracking &
Benchmarking
Real-Time
Decision Making
Cloud Rate
Optimization
Cloud Usage
Optimization
Organizational
Alignment
FinOps
Framework
Maturity
Phases
Rates
& Usage
FinOps is an evolving cloud financial management discipline
and cultural practice that enables organizations to get
maximum business value by helping engineering, finance &
business teams to collaborate on data-driven spending decision
Crawl Walk Run
Slide provided by the FinOps Foundation under the CC BY 4.0
Optimization Strategy
Start at the top
Efficiencies and cost savings compound
Coordinate your savings across the org
This is an iterative process
Abandoned Workloads
• Deleting abandoned pods, controllers, or even entire namespaces
Right Sizing Containers
• Updating pod manifests to reflect observed usage
• Providing requests and possibly LimitRanges for default resource allocations
• Always provide CPU requests, probably do not use CPU limits
• Always use memory requests and make limits equivalent
Managing Unclaimed Volumes
• Delete volumes that are unused by any pods or move them to a cheaper storage tier
Workload Strategies
Applications Running on Kubernetes
Kubernetes Strategies
Cluster Configurations
Right Sizing Cluster Nodes
• Adjust the number and size of your cluster's nodes to stop overspending on unused
capacity
• AMD CPUs may be less expensive than Intel for some workloads
Underutilized Nodes
• Adjust the number and type of your cluster's nodes to stop overspending on unused
capacity
• Check CPU, memory, storage class, and network requirements
Managing Unclaimed Volumes
• Delete volumes that are unused by any pods or move them to a cheaper storage tier
Operating System Optimizations
Under the Kubernetes Clusters
Delete Unassigned Resources
• Disks and IP addresses that are not being used by any clusters may continue to incur
charges
Resize Local Disks
• Resize local disks with low utilization
Switch to Arm architecture
• Arm CPUs are generally less expensive than Intel across cloud providers for similar
performance
Cloud Infrastructure Optimizations
Cloud FinOps
Reserved Instances
• Consider purchasing reserved instances based on historical resource usage patterns
Spot Instances
• Identify workloads ready for spot (preemptible) nodes and resize your cluster to realize
the savings of migrating workloads to spot
Savings Plans
• Talk to your cloud vendor about all your options
This is why you have a FinOps team.
Optimization Strategy
Start at the top
Efficiencies and cost savings compound
Coordinate your savings across the org
This is an iterative process
Thanks!
opencost@kubecost.com

More Related Content

Similar to SCaLE 20X: Kubernetes Cloud Cost Monitoring with OpenCost & Optimization Strategies (20)

PDF
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Matt Ray
 
PDF
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
Matt Ray
 
PPTX
Kubernetes Optimization - How We Cut Our Cloud Infrastructure Cost By 40% Usi...
Magalix Corporation
 
PDF
AWS Cloud cost optimization
Yogesh Sharma
 
PDF
AWS Cloud Cost Optimization
Yogesh Sharma
 
PDF
Cloud Cost Observability Metrics to Watch
Amnic
 
PDF
Top 5 Concerns When Optimizing Kubernetes Costs
Amnic
 
PPTX
DevFinOps
parkmycloud
 
PDF
Best Practices and Resources to Effectively Manage and Optimize Your AWS Costs
CloudHesive
 
PDF
faisal mushtaq - an enterprise cloud cost management framework
Dariia Seimova
 
PDF
12 Ways to Manage Cloud Costs and Optimize Cloud Spend
RightScale
 
PPTX
Burst workloads Cutting costs with Kubernetes and Virtual Kubelet
Adi Polak
 
PDF
Guy.Kfir - Cost Optimization at Scale - NL Summit 2016
Guy KFIR
 
PDF
Running Projects in Application Containers, System Containers & VMs - Jelasti...
Jelastic Multi-Cloud PaaS
 
PDF
International software testing conference 2017 fergal hynes
Fergal Hynes
 
PDF
knolx of KubeCost & Infracost
Knoldus Inc.
 
PDF
Knolx Goldilocks
Knoldus Inc.
 
PDF
Building a centralized observability platform
Elasticsearch
 
PDF
How to Find and Fix Waste to Optimize Your Cloud Spend
RightScale
 
PDF
Kubernetes Basics - ICP Workshop Batch II
PT Datacomm Diangraha
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Matt Ray
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
Matt Ray
 
Kubernetes Optimization - How We Cut Our Cloud Infrastructure Cost By 40% Usi...
Magalix Corporation
 
AWS Cloud cost optimization
Yogesh Sharma
 
AWS Cloud Cost Optimization
Yogesh Sharma
 
Cloud Cost Observability Metrics to Watch
Amnic
 
Top 5 Concerns When Optimizing Kubernetes Costs
Amnic
 
DevFinOps
parkmycloud
 
Best Practices and Resources to Effectively Manage and Optimize Your AWS Costs
CloudHesive
 
faisal mushtaq - an enterprise cloud cost management framework
Dariia Seimova
 
12 Ways to Manage Cloud Costs and Optimize Cloud Spend
RightScale
 
Burst workloads Cutting costs with Kubernetes and Virtual Kubelet
Adi Polak
 
Guy.Kfir - Cost Optimization at Scale - NL Summit 2016
Guy KFIR
 
Running Projects in Application Containers, System Containers & VMs - Jelasti...
Jelastic Multi-Cloud PaaS
 
International software testing conference 2017 fergal hynes
Fergal Hynes
 
knolx of KubeCost & Infracost
Knoldus Inc.
 
Knolx Goldilocks
Knoldus Inc.
 
Building a centralized observability platform
Elasticsearch
 
How to Find and Fix Waste to Optimize Your Cloud Spend
RightScale
 
Kubernetes Basics - ICP Workshop Batch II
PT Datacomm Diangraha
 

More from Matt Ray (20)

PDF
HashiTalks 2020 - Chef Tools & Terraform: Better Together
Matt Ray
 
PDF
EmacsConf 2019: Interactive Remote Debugging and Development with TRAMP Mode
Matt Ray
 
PDF
Wellington DevOps: Bringing Your Applications into the Future with Habitat
Matt Ray
 
PDF
DevOps Days Singapore 2018 Ignite - Bringing Your Applications into the Futur...
Matt Ray
 
PDF
Cloud Expo Asia 20181010 - Bringing Your Applications into the Future with Ha...
Matt Ray
 
PDF
Compliance as Code Everywhere
Matt Ray
 
PDF
DevOpsDays Jakarta: State of DevOps 2018
Matt Ray
 
PDF
DevOps Talks Melbourne 2018: Whales, Cats and Kubernetes
Matt Ray
 
PDF
Infrastructure and Compliance Delight with Chef Automate
Matt Ray
 
PDF
Cooking Up Windows with Chef Automate
Matt Ray
 
PDF
DevOpsDays Singapore - Continuous Auditing with Compliance as Code
Matt Ray
 
PDF
DevOpsDays Singapore Habitat Ignite
Matt Ray
 
PDF
Chef Automate - Azure Sydney User Group
Matt Ray
 
PDF
Automating Compliance with InSpec - AWS North Sydney
Matt Ray
 
PDF
Automating Applications with Habitat - Sydney Cloud Native Meetup
Matt Ray
 
PDF
Automating AWS Compliance with InSpec
Matt Ray
 
PDF
Chef Automate - Infracoders Canberra August 8, 2017
Matt Ray
 
PDF
OpsWorks for Chef Automate - Auckland AWS
Matt Ray
 
PDF
Chef Automate - Wellington DevOps August 2, 2017
Matt Ray
 
PDF
Compliance as Code: Shifting Compliance Left in Continuous Delivery
Matt Ray
 
HashiTalks 2020 - Chef Tools & Terraform: Better Together
Matt Ray
 
EmacsConf 2019: Interactive Remote Debugging and Development with TRAMP Mode
Matt Ray
 
Wellington DevOps: Bringing Your Applications into the Future with Habitat
Matt Ray
 
DevOps Days Singapore 2018 Ignite - Bringing Your Applications into the Futur...
Matt Ray
 
Cloud Expo Asia 20181010 - Bringing Your Applications into the Future with Ha...
Matt Ray
 
Compliance as Code Everywhere
Matt Ray
 
DevOpsDays Jakarta: State of DevOps 2018
Matt Ray
 
DevOps Talks Melbourne 2018: Whales, Cats and Kubernetes
Matt Ray
 
Infrastructure and Compliance Delight with Chef Automate
Matt Ray
 
Cooking Up Windows with Chef Automate
Matt Ray
 
DevOpsDays Singapore - Continuous Auditing with Compliance as Code
Matt Ray
 
DevOpsDays Singapore Habitat Ignite
Matt Ray
 
Chef Automate - Azure Sydney User Group
Matt Ray
 
Automating Compliance with InSpec - AWS North Sydney
Matt Ray
 
Automating Applications with Habitat - Sydney Cloud Native Meetup
Matt Ray
 
Automating AWS Compliance with InSpec
Matt Ray
 
Chef Automate - Infracoders Canberra August 8, 2017
Matt Ray
 
OpsWorks for Chef Automate - Auckland AWS
Matt Ray
 
Chef Automate - Wellington DevOps August 2, 2017
Matt Ray
 
Compliance as Code: Shifting Compliance Left in Continuous Delivery
Matt Ray
 
Ad

Recently uploaded (20)

DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Ad

SCaLE 20X: Kubernetes Cloud Cost Monitoring with OpenCost & Optimization Strategies

  • 1. Kubernetes Cloud Cost Monitoring with OpenCost & Optimization Strategies Matt Ray Senior Community Manager for OpenCost [email protected] SCaLE 20x
  • 2. Who am I? Matt Ray • Senior Community Manager for OpenCost at Kubecost. • Co-host of the Software Defined Talk podcast for 8+ years. • Living in Sydney, Australia for 6+ years after relocating from Austin, Texas. • Active in Open Source for much, much longer. • [email protected] • https://www.linkedin.com/in/mhray/ • @mattray on GitHub, Mastodon, too many Slacks
  • 3. The complexity of operating Kubernetes efficiently is real 3 Technical COMPLEXITY Metal VMs K8s Higher-level abstractions, more shared resources, and increasingly dynamic Behavioral COMPLEXITY Decentralized releases means any engineer can increase spend quickly Abstraction Any engineer Any org Any time $ $ $ $ $ $
  • 4. OpenCost Specification and Implementation Cloud Native Computing Foundation Sandbox Project FinOps Certified Solution • https://opencost.io • https://github.com/opencost • https://www.cncf.io/projects/opencost/ Open source Kubernetes cost monitoring
  • 5. OpenCost Specification • Adobe • Armory • AWS • D2IQ • Google Cloud • Kubecost • Mindcurv • New Relic • Pixie • Red Hat • SUSE Created by a community of Kubernetes practitioners https://github.com/opencost/opencost/blob/develop/spec/opencost-specv01.md
  • 6. OpenCost Specification https://github.com/opencost/opencost/blob/develop/spec/opencost-specv01.md Kubernetes workloads are often transient and vary in the resources they consume. How do we measure who is responsible for what and how much? • Management fees • Expenses from nodes • Persistent volumes • Attached disks • Load balancers • Network ingress/egress
  • 7. Total Cluster Costs = Total Cluster Costs = Cluster Asset Costs + Cluster Overhead Costs Total Cluster Costs Cluster Asset Costs Cluster Overhead Costs
  • 8. Cluster Asset Costs Cluster Asset Costs = Resource Allocation Costs + Resource Usage Costs = Total Cluster Costs Cluster Asset Costs Cluster Overhead Costs Resource Allocation Costs Resource Usage Costs Cluster Overhead Costs
  • 9. Cluster Asset Costs: Node Costs Cluster Asset Costs = Resource Allocation Costs + Resource Usage Costs = Total Cluster Costs Resource Allocation Costs Resource Usage Costs Cluster Overhead Costs Network Egress Cluster Management Fees Persistent Volume Load Balancer Node (CPU, RAM, GPU)
  • 10. We've got the cost of our Kubernetes assets Now let's distribute them across Workloads
  • 11. Workload Costs Inside the Kubernetes Cluster What is Measured • CPU • Memory • GPU • Storage Volume • Load Balancer Aggregations • Container • Pod • Deployment • StatefulSet • Job • Controller Name • Controller Kind • Label • Annotation • Namespace • Node • Cluster
  • 12. Workload Costs + Cluster Idle Costs Total Cluster Costs = Workloads + Cluster Idle Costs + Cluster Overhead Costs = Total Cluster Costs Resource Allocation Costs Resource Usage Costs Cluster Overhead Costs Total Cluster Costs Workload Costs Cluster Overhead Costs Cluster Idle Costs
  • 13. Workload Costs + Cluster Idle Costs Total Cluster Costs = Workloads + Cluster Idle Costs + Cluster Overhead Costs = Total Cluster Costs Resource Allocation Costs Resource Usage Costs Cluster Overhead Costs Workload Costs Cluster Overhead Costs Cluster Idle Costs
  • 14. Workload Costs + Cluster Idle Costs Total Cluster Costs = Workloads + Cluster Idle Costs + Cluster Overhead Costs = Total Cluster Costs Resource Allocation Costs Resource Usage Costs Cluster Overhead Costs Cluster Idle Costs Allocated Costs Cluster Overhead Costs Usage Costs
  • 15. Cluster Idle Cost Idle costs can be calculated at the Asset/Resource and at the Workload level. Cluster Idle Cost = Cluster Asset Costs – Workload Costs Allocated Idle Total CPU Capacity
  • 16. I understand what we're measuring How do I get at the metrics?
  • 18. Deploying OpenCost https://www.opencost.io/docs/install Prometheus • Prom community Helm chart the default OpenCost Manifest • kubectl apply --namespace opencost -f https://raw.githubusercontent.com/opencost/opencost/develop/kubernetes/opencost.yaml OpenCost Helm Chart • https://github.com/opencost/opencost-helm-chart/ • Configurable settings (Prometheus, namespaces, etc.)
  • 19. Accessing OpenCost • API • Web UI • kubectl cost • Prometheus
  • 21. What's the Future of OpenCost?
  • 22. What's the Future of OpenCost? What do you want it to be?
  • 23. Near-Term Roadmap • External Asset Costs • Backstage integration • More Clouds • More Documentation • More Integrations
  • 24. Get Involved with OpenCost https://www.opencost.io Slack • https://slack.cncf.io/ #opencost GitHub • https://github.com/opencost/opencost • https://github.com/opencost/opencost-helm-chart • https://github.com/opencost/opencost-website OpenCost Working Group • https://bit.ly/opencost-calendar • https://bit.ly/opencost-meeting LinkedIn • https://www.linkedin.com/showcase/opencost/
  • 25. Kubernetes Optimization Strategies We've got the numbers, now what do we do?
  • 26. FinOps https://finops.org The FinOps Foundation provides guidance on cloud financial management through best practices, education, and standards. Establish a FinOps practice within your organization.
  • 27. 27 Domains Personas FinOps Practitioner Executive Business/Product Owner Finance/Procurement Engineering/Operations Principles ▸ Teams need to collaborate ▸ Everyone takes ownership for their cloud usage ▸ A centralized team drives FinOps ▸ Reports should be accessible and timely ▸ Decisions are driven by business value of cloud ▸ Take advantage of the variable cost model of the cloud Understanding Cloud Usage and Cost Performance Tracking & Benchmarking Real-Time Decision Making Cloud Rate Optimization Cloud Usage Optimization Organizational Alignment FinOps Framework Maturity Phases Rates & Usage FinOps is an evolving cloud financial management discipline and cultural practice that enables organizations to get maximum business value by helping engineering, finance & business teams to collaborate on data-driven spending decision Crawl Walk Run Slide provided by the FinOps Foundation under the CC BY 4.0
  • 28. Optimization Strategy Start at the top Efficiencies and cost savings compound Coordinate your savings across the org This is an iterative process
  • 29. Abandoned Workloads • Deleting abandoned pods, controllers, or even entire namespaces Right Sizing Containers • Updating pod manifests to reflect observed usage • Providing requests and possibly LimitRanges for default resource allocations • Always provide CPU requests, probably do not use CPU limits • Always use memory requests and make limits equivalent Managing Unclaimed Volumes • Delete volumes that are unused by any pods or move them to a cheaper storage tier Workload Strategies Applications Running on Kubernetes
  • 30. Kubernetes Strategies Cluster Configurations Right Sizing Cluster Nodes • Adjust the number and size of your cluster's nodes to stop overspending on unused capacity • AMD CPUs may be less expensive than Intel for some workloads Underutilized Nodes • Adjust the number and type of your cluster's nodes to stop overspending on unused capacity • Check CPU, memory, storage class, and network requirements Managing Unclaimed Volumes • Delete volumes that are unused by any pods or move them to a cheaper storage tier
  • 31. Operating System Optimizations Under the Kubernetes Clusters Delete Unassigned Resources • Disks and IP addresses that are not being used by any clusters may continue to incur charges Resize Local Disks • Resize local disks with low utilization Switch to Arm architecture • Arm CPUs are generally less expensive than Intel across cloud providers for similar performance
  • 32. Cloud Infrastructure Optimizations Cloud FinOps Reserved Instances • Consider purchasing reserved instances based on historical resource usage patterns Spot Instances • Identify workloads ready for spot (preemptible) nodes and resize your cluster to realize the savings of migrating workloads to spot Savings Plans • Talk to your cloud vendor about all your options This is why you have a FinOps team.
  • 33. Optimization Strategy Start at the top Efficiencies and cost savings compound Coordinate your savings across the org This is an iterative process