-
Notifications
You must be signed in to change notification settings - Fork 17
Set up autoscaling for nodes #74
Comments
'Autoscaling' can refer to three different things in Kubernetes:
Due to the way Kubernetes is architected, Cluster Autoscalers are easy to build. You have a program that runs in a loop, doing the following things:
GKE provides an alpha autoscaler that can be used to accomplish certain autoscaling goals. Unfortunately, it does not really work for us yet. This is because:
is not true for us at all - destroying pods will cause a student to possibly lose their work, and will not be restarted on another node without manual action. This means their definition of safety doesn't work for us yet. This will hopefully change in the future. Also, it only spawns new nodes then there are pods that are already scheduled but there is no place to run them. This means that we can not set a goal like 'cluster is at most 80% full at all times' - the autoscaler is hard coded to a particular goal, which is to kick in after the cluster is 100% full. This will probably be made configurable in the future, but not yet. Azure Container Services doesn't have any default cluster autoscaler yet at all. So for now, we've to write our own. It should not be too complicated, however. |
For Azure, we'll need to make this REST API call to change the For GKE I think we can use |
https://cloud.google.com/sdk/gcloud/reference/container/clusters/resize It looks like resizing clusters down choose random nodes in the cluster as opposed to allowing users to specify them (this may be problematic without a replication controller) -- has anyone seen any other solutions? |
Is it possible to use |
We can test that with the dev cluster easily.
Also, we should use
https://cloud.google.com/compute/docs/tutorials/python-guide for the
autoscaler, rather than shelling out to gcloud.
…On Fri, Feb 17, 2017 at 3:52 PM, Tony Yang ***@***.***> wrote:
Is it possible to use kubectl delete to remove the node from the cluster (
https://kubernetes.io/docs/user-guide/kubectl/kubectl_delete/) and then
use gcloud to shutdown the Google Compute Engine VM?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#74 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAB23iVuBvv_pXauN3FzYLyeufLPzBO-ks5rdjLNgaJpZM4LDQmw>
.
--
Yuvi Panda T
http://yuvi.in/blog
|
I'm testing this out now. Will report back with findings. |
I tried several approaches, and found one that worked! Failed approach 1 -
|
Thanks for the help Yuvi! Tested it myself and confirmed that this is what we're looking for. For future reference, the command will look like this for removing an instance in the dev cluster: Where the instance group and instance name are to be specified |
We should automatically scale up and down nodes as needed.
See https://github.com/data-8/jupyterhub-k8s/blob/master/docs/autoscaling.md for an explanation of rationale and a starting point for implementation.
The text was updated successfully, but these errors were encountered: