How can I optimize costs for my Kubernetes workloads on AWS?
Our monthly cloud bill for our Kubernetes clusters has skyrocketed recently. We use managed node groups on AWS EKS, but it feels like we are over-provisioning. Are there specific tools or horizontal pod autoscaling strategies that can help us reduce costs without affecting the performance of our production microservices? I’m specifically interested in spot instances and rightsizing.
2024-08-15 in Cloud Technology by Michael Brown
| 12066 Views
All answers to this question.
To tackle high costs, I highly recommend looking at Karpenter instead of the standard Cluster Autoscaler. Karpenter is much faster at provisioning the right-sized instances based on the actual pending pods. You should also integrate Spot Instances for non-critical workloads or stateless microservices, which can save up to 90% compared to on-demand pricing. Use a tool like Kubecost to get granular visibility into which namespace or team is driving the spend. Finally, ensure your Horizontal Pod Autoscaler (HPA) is configured with sensible thresholds.
Answered 2024-08-17 by Barbara Miller
Have you checked your resource requests versus actual usage? Most teams set requests way too high "just in case," which leads to wasted capacity that you're still paying for even if it's not being used.
Answered 2024-08-18 by Thomas Wilson
-
Thomas, you're spot on. I used the Vertical Pod Autoscaler in 'recommender' mode and found our dev environment was over-provisioned by 40%. By aligning our YAML requests with the VPA's suggestions, we managed to downsize our instance types from m5.xlarge to t3.medium for the staging clusters, saving a significant amount of money without any downtime.
Commented 2024-08-19 by Michael Brown
Vertical Pod Autoscaler (VPA) is great for rightsizing. It automatically adjusts your container requests based on historical usage so you don't have to guess.
Answered 2024-08-20 by Susan Taylor
-
Susan makes a great point. VPA combined with Karpenter creates a very efficient "just-in-time" infrastructure that keeps overhead to an absolute minimum.
Commented 2024-08-21 by Barbara Miller
Write a Comment
Your email address will not be published. Required fields are marked (*)

