Skip to content

Conversation

@spa-raj
Copy link

@spa-raj spa-raj commented Dec 3, 2025

  • Blog post introducing Kubemodel - Opencost Data Model 2.0 which I worked on as part of my LFX Fall 2025 Mentorship.

@netlify
Copy link

netlify bot commented Dec 3, 2025

Deploy Preview for opencost ready!

Name Link
🔨 Latest commit 0e9d44f
🔍 Latest deploy log https://app.netlify.com/projects/opencost/deploys/693063180008710008ca5235
😎 Deploy Preview https://deploy-preview-441--opencost.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Member

@ameijer ameijer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

general feedback - this is a tech blog post, I suggest you embed code snippets of a few selected data structures and walk the users through it. EMbed in places like the o(1) discussions etc


## The Challenge: Tracking Resources in a Dynamic Environment

Kubernetes is inherently dynamic. Pods come and go, deployments scale up and down, and resource names can be reused across recreation cycles. Traditional metric tracking that relies solely on resource names struggles in this environment:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Kubernetes is inherently dynamic. Pods come and go, deployments scale up and down, and resource names can be reused across recreation cycles. Traditional metric tracking that relies solely on resource names struggles in this environment:
Kubernetes is inherently dynamic. Pods come and go, deployments scale up and down, and resource names can be reused across recreation cycles. Traditional metric tracking that relies solely on resource names struggles in this environment for a number of reasons including:


Kubernetes is inherently dynamic. Pods come and go, deployments scale up and down, and resource names can be reused across recreation cycles. Traditional metric tracking that relies solely on resource names struggles in this environment:

- **Name reuse**: When a pod is recreated with the same name, historical cost data can become ambiguous
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **Name reuse**: When a pod is recreated with the same name, historical cost data can become ambiguous
- **Name reuse**: When a pod is recreated with the same name, historical cost data can become ambiguous. This is particularly problematic in stateful set pods

- **Owner/Controller** - Deployments, StatefulSets, ReplicaSets, DaemonSets, Jobs
- **Service** - Network service abstractions
- **Volume & PVC** - Persistent storage resources
- **ResourceQuota** - Namespace resource limits and requests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

coming soon - GPU


## Binary Serialization with Bingen

KubeModel introduces **bingen-annotated Go structs** enabling efficient binary serialization. Bingen is IBM Kubecost's internal tool for generating binary serialization code from annotated Go structs. This provides:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
KubeModel introduces **bingen-annotated Go structs** enabling efficient binary serialization. Bingen is IBM Kubecost's internal tool for generating binary serialization code from annotated Go structs. This provides:
KubeModel introduces **bingen-annotated Go structs** enabling efficient binary serialization. Bingen is OpenCost specific tooling for generating binary serialization code from annotated Go structs. This provides:


These tests run across multiple time windows (1h, 6h, 24h) to ensure consistency and catch edge cases in real-world scenarios.

## The Road Ahead
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this section feel very AI-ish. Nothing in here is regarding what you think the next steps are, just what has already been accomplished, right?


## Acknowledgments

A special thanks to my mentors for their guidance and support throughout this project: [Alex Meijer](https://github.com/ameijer), [Sean Holcomb](https://github.com/Sean-Holcomb), and [Niko Kovacevic](https://github.com/nikovacevic). No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants