6

I want to add a new node in existing kubernetes cluster, but with a different machine type. For the new node I will add label for it so that only some application will run on it.

I tried the following command

gcloud compute instance-groups managed resize CONTAINER_GROUP --zone ZONE --size 5 --machine-type n1-standard-8 

And it returns an error

ERROR: (gcloud.compute.instance-groups.managed.resize) unrecognized arguments: --machine-type n1-standard-8

How can I add a new node into existing kubernetes cluster with a different machine type?

1
  • This question was previously answered on Stack Overflow. Commented Mar 16, 2016 at 17:14

3 Answers 3

2

You can work around the single machine-type restriction by creating a new instance group with a (modified) copy of GKE's instance template. See this answer for more details. Note that later you may need to manually upgrade that instance group (instead of using GKE's Node Upgrade API).

7
1
  • 1
    Followed that guide and successfully started migrating pods from one old node to the newer one Commented Nov 3, 2016 at 11:08
0

This is something not available today with Google Container Engine. You can only have identical nodes in the cluster.

Generally, you can change the instance type but not when instance is part of the instance group. Even if you could change the instance type in the instance group (which you can't), the GKE doesn't support yet mixed clusters.

4
  • But the doc says I can change the machine type of a stopped node. I tried that and it says ERROR: (gcloud.compute.instances.set-machine-type) Some requests did not succeed: - The resource 'xxxx' is not ready. So Google disabled that? Commented Mar 16, 2016 at 12:59
  • Generally, you can change the instance type but not when instance is part of the instance group. Even if you could change the instance type in the instance group (which you can't), the GKE doesn't support yet mixed clusters. Commented Mar 16, 2016 at 13:06
  • So if I want to upgrade the machine type, I need create a new cluster? Seems unreasonable for production environment since that would lead to downtime Commented Mar 16, 2016 at 13:11
  • @user325320 - unfortunately, this is the situation today. Commented Mar 16, 2016 at 15:01

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.