What’s the Best Way to Track User-Launched Pods in a Multi-Tenant Kubernetes Setup?

0
1
Asked By TechSage42 On

I'm developing a multi-tenant platform using Kubernetes where users can launch their own pods. My challenge is finding the best pattern to track these pods while keeping the business state and Kubernetes state interconnected. Should I use a Controller with Postgres, or is an Operator with Custom Resource Definitions (CRD) the better approach? I'm looking for something similar to what platforms like vast.ai or runpod.io do. Any insights on the best practices here?

4 Answers

Answered By PodMaster5000 On

Honestly, stick with the Operator + CRD approach for tracking. It's a smart way to tie together Kubernetes state with your business metrics without having to solely rely on a database like Postgres for everything.

Answered By DevWizard76 On

You might want to consider using namespaces for each tenant to maintain isolation. Alongside that, labels and annotations are perfect for adding metadata to your pods. But remember, while they help with organization, they won't replace the need for a solid business logic framework to keep everything aligned.

TechSage42 -

That's a great point! It sounds like combining namespaces for isolation with an Operator for state management could be a solid path forward.

Answered By K8S_Guru88 On

Namespaces per tenant really do help with isolation, especially in a multi-tenant setup. Just keep in mind that while those labels and annotations are metadata helpers, they won't provide context for business logic on their own. You definitely want that Operator functionality if you need to keep both state levels in sync.

Answered By CloudNinja99 On

For tracking user-launched pods in a multi-tenant setup, I'd recommend using the Operator pattern along with Custom Resource Definitions (CRDs). This approach allows you to monitor and react to changes in the Kubernetes state, which is essential for syncing with your business logic.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.