How to Manage Rare High-Memory Workloads in Kubernetes?

0
7
Asked By CloudySkies88 On

I'm a Junior Cloud Engineer trying to figure out the best way to manage a particular container that mostly sits idle but occasionally needs a significant amount of memory for short bursts. Our policy currently has it set so that the request equals the limit to ensure stability, which is causing a lot of unnecessary resource waste. I'm trying to decide between two options: sticking to the policy and wasting resources or allowing burstable requests. I'm concerned about running into out-of-memory kills if spikes occur when the node is busy. I'm also considering isolating this workload into a dedicated execution Pod or Job. Does anyone have recommendations on how to size the memory for this, or standard practices for dynamically scaling resources only when needed?

1 Answer

Answered By TechGuru42 On

You should consider using KEDA to horizontally scale your instances instead of vertically scaling resources for your container. It's a good approach to avoid those major spikes. Scheduling jobs for your heavy workloads can make things more predictable. If your workload can run without the need for an always-on pod, that’s ideal!

MemoryNinja99 -

Exactly! Just keep in mind that scaling memory doesn't always match CPU scaling perfectly. If your workload can't be split into smaller tasks, using Jobs with realistic memory requests might be a better route than trying to create multiple replicas.

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.