Search code examples
kuberneteskops

Kops cannot edit nodes instance types


I'm getting the following error when trying to modify the instance types of the worker/master nodes of my k8s cluster.

error reading InstanceGroup "nodes": InstanceGroup.kops.k8s.io "nodes" not found

I run the following:

kops edit ig nodes --name ${NAME}

error reading InstanceGroup "nodes": InstanceGroup.kops.k8s.io "nodes" not found

Am I missing something here?

$ kops get instancegroups --name ${NAME}
NAME            ROLE    MACHINETYPE MIN MAX ZONES
master-us-east-2a   Master  t3.medium   1   1   us-east-2a
nodes-us-east-2a    Node    t3.medium   1   1   us-east-2a
nodes-us-east-2b    Node    t3.medium   1   1   us-east-2b

This works.

Maybe Kops has changed recently and they don't group all nodes under the same name anymore as previously?


Solution

  • kOps did indeed change recently in that new clusters are provisioned with one instance group per availability zone (AZ) instead of having one node IG that spans all AZs.

    So in your case, you want to edit both nodes-us-east-2a and nodes-us-east-2b.

    As a bonus comment, I really recommend that you both

    • use kops get -o yaml to dump the specs and put them under version control
    • template your IG spec so that you ensure they are consistent.