MHRubel
HomeAboutProjectsSkillsExperienceBlogContact
MHRubel

Senior Software Engineer crafting high-performance web applications and SaaS platforms.

Navigation

  • Home
  • About
  • Projects
  • Skills
  • Experience
  • Blog
  • Contact

Get in Touch

Available for senior/lead roles and consulting.

bd.mhrubel@gmail.comHire Me

© 2026 Mahamudul Hasan Rubel. All rights reserved.

Built with using Next.js 16 & Tailwind v4

Back to Blog
TechnologySoftware EngineeringJune 19, 20263 min read

Kubernetes VPA and Goldilocks: Master Resource Right-Sizing

Master Kubernetes resource right-sizing with VPA and Goldilocks. Stop over-provisioning and start optimizing your cluster efficiency with this practical guide.

KubernetesDevOpsVPAGoldilocksCloud-NativeSREResource-ManagementLinuxServer

Most Kubernetes clusters I’ve audited are hemorrhaging money. It’s almost always the same story: developers set CPU and memory requests to “what feels safe,” which usually means 2x or 3x what the application actually needs. You end up with a cluster that looks full but is mostly running idle cycles.

If you’re tired of manually tuning resource manifests, it’s time to automate the process. We’ll combine the Vertical Pod Autoscaler (VPA) with Goldilocks to turn resource right-sizing from a guessing game into a data-driven workflow.

The Problem with Manual Resource Allocation

When you define a deployment, you set requests and limits. Kubernetes uses requests for scheduling. If you set these too high, your nodes report they’re full, forcing you to add more nodes—and pay more cloud provider bills. If you set them too low, you hit OOMKills and CPU throttling.

Finding the "Goldilocks" zone—where resources are neither too hot nor too cold—is impossible to do manually across hundreds of microservices. That’s where automation comes in.

Step 1: Deploying Vertical Pod Autoscaler (VPA)

The VPA monitors your actual pod usage over time and updates the spec.containers.resources for you. I prefer running it in RecommendationMode rather than letting it restart pods automatically, as it gives the team a chance to review the changes.

You can install VPA via Helm:

Bash
helm repo add fairwinds-stable https://charts.fairwinds.com/stable
helm install vpa fairwinds-stable/vpa --namespace vpa --create-namespace

Once installed, the VPA controller creates a VerticalPodAutoscaler custom resource. It starts observing usage immediately. But staring at raw JSON output from kubectl get vpa -o yaml is a nightmare. This is where Goldilocks enters the picture.

Step 2: Visualizing Recommendations with Goldilocks

Goldilocks is an open-source tool from Fairwinds that aggregates VPA recommendations into a clean, readable dashboard. It tells you exactly what your requests should be based on real-time metrics.

To set it up:

Bash
helm repo add fairwinds-stable https://charts.fairwinds.com/stable
helm install goldilocks fairwinds-stable/goldilocks --namespace goldilocks --create-namespace

Once installed, label the namespaces you want to monitor:

Bash
kubectl label namespace default goldilocks.fairwinds.com/vpa=enabled

Now, navigate to the Goldilocks dashboard (usually via port-forwarding the service). You’ll see a breakdown for every deployment. It categorizes recommendations into:

  • Current: What’s in your manifest.
  • Recommendation: What VPA suggests.
  • Limit: The suggested hard cap.

Implementing Kubernetes Resource Optimization

Don't just blindly apply these numbers. Kubernetes resource optimization is a process, not a one-time fix. Here’s the workflow I recommend for your team:

  1. Monitor: Label your production namespaces for Goldilocks and let it gather data for at least 72 hours.
  2. Analyze: During your sprint planning, check the Goldilocks dashboard. Look for pods with high discrepancies between requests and usage.
  3. Apply: Update your Helm charts or Kustomize manifests with the new, tighter values.
  4. Verify: Deploy the changes and monitor for CPU throttling or OOMKills using Prometheus/Grafana.

Why This Matters for Cluster Efficiency

By implementing Kubernetes VPA and Goldilocks, you’re not just saving money; you’re improving cluster efficiency. When you right-size your pods, the Kubernetes scheduler can pack more pods onto fewer nodes. This reduces your cloud footprint and reduces the "noise" in your cluster.

I’ve seen teams reduce their monthly AWS bill by 30-40% just by tightening these requests. It’s the highest ROI task you can perform as an SRE or DevOps engineer.

Stop guessing. Start measuring. Your cluster—and your CFO—will thank you.

Back to Blog

Similar Posts

TechnologyJune 19, 20263 min read

Kubernetes Resource Management: Using VPA Recommendation Mode

Master Kubernetes resource management with VPA recommendation mode. Learn how to optimize container resource utilization and improve your capacity planning workflow.

Read more
TechnologyJune 19, 20263 min read

Kubernetes Canary Deployments: A Guide to Flagger and Istio

Master Kubernetes Canary Deployments using Flagger and Istio. Learn how to automate traffic shifting, run health checks, and achieve safer progressive delivery.

Read more
Software EngineeringJune 19, 20263 min read

Kubernetes Autoscaling with Karpenter and AWS Spot Instances

Master Kubernetes autoscaling using Karpenter and AWS spot instances. Learn how to optimize cloud costs and automate node provisioning for your cluster.

Read more