0
votes

While creating a cluster, kops gives us a set of arguments to configure the images to be used for the master instances and the node instances like the following as mentioned in the kops documentation for create cluster command : https://github.com/kubernetes/kops/blob/master/docs/cli/kops_create_cluster.md

--image string                     Set image for all instances.
--master-image string              Set image for masters. Takes precedence over --image
--node-image string                Set image for nodes. Takes precedence over --image

Suppose I forgot to add these parameters when I created the cluster, how can I edit the cluster and update these things?

While running kops edit cluster the cluster configuration opens up as a yaml.. but where should I add these things in there?

is there complete kops cluster yaml that I can refer to modify my cluster?

1

1 Answers

0
votes

You would need to edit the instance group after the cluster is created to add/edit the image name.

kops get ig
kops edit ig <ig-name>

After the update is done for all masters and nodes, perform

kops update cluster <cluster-name>
kops update cluster <cluster-name> --yes

and then perform rolling-update or restart/stop 1 instance at a time from the cloud console

kops rolling-update cluster <cluster-name>
kops rolling-update cluster <cluster-name> --yes 

in another terminal kops validate cluster <cluster-name> to validate the cluster

there are other flags we can use as well while performing the rolling-update

There are other parameters as well which you can add, update, edit in the instance group - take a look at the documentation for more information