The First Demo / Prototype of the Flux Operator Elasticity!

by vs
GNU/Linux ◆ xterm-256color ◆ bash 533 views

Here we combine Flux’s ability to dynamically scale up and down with an application asking it to - a demo (and story!) of Gopherlocks and (not the three bears, where would you get that idea?)

For some background, dynamism isn’t a fully supported feature in Flux, but rather we are taking advantage of the fact that a node can go offline or come online and Flux is OK with that. The trick is that although we start the cluster as size 2, we tell Flux there could potentially be a total of 10, so then when a MiniCluster Custom Resource definition under a particular name and namespace asks to be made smaller or larger? The pod pops up, and is detected by Flux. The MiniCluster has dynamically scaled, just like that.

But that wasn’t really good enough - some user isn’t going to monitor their applicatiion and want to apply YAML! But then this evening I realized that the standard Kubernetes APIs can actually be hit with an “inside the cluster” config. And so what this demo shows is exactly that - an application making requests to scale up and down, and then getting the updated MiniCluster spec and listing pod and seeing it actually happened! This is just a fun story, but this could be very powerful with actual workflows that need that feature.

This was worth staying up too late for, it was so fun! Gnite friends!