Alex Feinberg
Alex Feinberg

Reputation: 265

How do I scale up my cluster on Google Container Engine / Kubernetes?

I have two instances of an app container (happens to be a Node.JS app, but that shouldn't matter) running in a Kubernetes cluster on Google Container Engine. I'd like to scale it up to three instances.

My cluster has a master and two minion nodes, with a replication controller and a load balancer service. The replication controller keeps my app container running happily on the two nodes.

I can see that there is a handy gcloud alpha container kubectl resize command which lets me change the number of replicas, but I don't see how or if I can increase the size of the cluster itself, so that it can spin up another minion node. I only see gcloud commands to create, delete, list and describe clusters; nothing to resize them.

If I can't resize my cluster, then to scale up I'd need to create a whole new cluster and kill the old one. Am I missing something?

Also, are there plans to support auto-scaling?

Upvotes: 8

Views: 1931

Answers (2)

François Kawala
François Kawala

Reputation: 446

This presentation: http://fr.slideshare.net/craigbox/autoscaling-kubernetes is about kubernetes horizontal scaling in Google Cloud. I put this link here to save some googling to next one that ends up on this thread.

Upvotes: 1

Robert Bailey
Robert Bailey

Reputation: 18200

Update (June 2015): Kubernetes on GCE now uses managed instance groups which you can manually resize to add new nodes to your cluster.


There isn't currently a way to add nodes to your existing Google Container Engine cluster. We are currently adding support to Kubernetes to allow clusters to have nodes dynamically added but the work isn't quite finished yet. Once the feature is available in Kubernetes you can expect that it will show up in Google Container Engine shortly after the next Kubernetes release.

In the mean time, it should be possible to run more than two replicas of your node.js application on the existing two VMs.

Upvotes: 6

Related Questions