Auto Scale Up/Down with K8s Deployment
Hi there, is it possible to use auto scale feature with Minecraft server created by a Deployment? I guess no as I saw in the README.
Is it possible to add this feature? (I'm using rook-ceph as a storage controller and I think I don't really need StatefulSet. Correct me if I don't know something that would change my mind.)
Very good question. Since it's only adjusting the replica count, then I think it could be enhanced to support Deployment type since it also derives from ReplicaSet.
I'll have to research the code some more.
...ok, this might be tricky. StatefulSet has a serviceName field, which is leveraged by the auto scale feature.
With Deployment it's more indirect to find the association since
- Deployment selects Pods
- Service selects Pods
So I think it would take some type of logic to find the intersection of selected pods.
@itzg I don't know how works the auto scale feature with StatefulSet but it is not simple has taking the selector label name of the service to get the statefulset corresponding and scaling up/down? I guess it's what it could be with Deployment but I don't know exactly what is the difference with StatefulSet.
I explained it above.