Updating a Managed Service for Kubernetes node group
Individual nodes in node groups are Yandex Compute Cloud virtual machines with automatically generated names. To configure nodes, follow the instructions below or other node group management guides.
Alert
Do not change node VM settings, including names, network interfaces, and SSH keys, using the Compute Cloud interfaces or SSH connections to the VM.
This can disrupt the operation of individual nodes, groups of nodes, and the whole Managed Service for Kubernetes cluster.
To access a node group, use its name or unique ID obtained using the command:
yc managed-kubernetes node-group list
Result:
+----------------------+----------------------+-------------+----------------------+---------------------+---------+------+
| ID | CLUSTER ID | NAME | INSTANCE GROUP ID | CREATED AT | STATUS | SIZE |
+----------------------+----------------------+-------------+----------------------+---------------------+---------+------+
| catt3knapbq5******** | cati493bu7ia******** | k8s-demo-ng | cl1tbm76ms7p******** | 2019-11-20 12:01:02 | RUNNING | 2 |
+----------------------+----------------------+-------------+----------------------+---------------------+---------+------+
Before you start, make sure you have enough free resources in your cloud.
Changing node group parameters
You can change the following parameters of a Managed Service for Kubernetes node group:
-
Name.
-
Description.
-
Scaling for fixed type: Number of Managed Service for Kubernetes nodes. Scaling for automatic type: Minimum, maximum, and initial number of Managed Service for Kubernetes nodes. You cannot change the scaling type.
-
IP address assignment method: internal only or both internal and external.
-
List of security groups.
Alert
Do not delete security groups attached to a running Managed Service for Kubernetes node group as this may disrupt its operation and result in a loss of data.
-
Computing resources and Managed Service for Kubernetes node disk size.
-
Managed Service for Kubernetes node name template.
-
Updates policy.
To learn how to change the availability zone of a node group, see Migrating Managed Service for Kubernetes resources to a different availability zone.
To update a Managed Service for Kubernetes node group:
- Open Managed Service for Kubernetes in the folder where you want to update the Managed Service for Kubernetes cluster.
- Click the name of the Managed Service for Kubernetes cluster.
- Go to the Node group tab.
- Select the required node group.
- Click Edit in the top-right corner.
- Change the required parameters in the window that opens.
- Click Save.
Get detailed information about the command to edit the Managed Service for Kubernetes node group:
yc managed-kubernetes node-group update --help
Use the following flags to update the Managed Service for Kubernetes node group:
-
--new-name
: Change name. -
--description
: Change description. -
--service-account-id
,--service-account-name
: Change service account for resources. -
--node-service-account-id
,--node-service-account-name
: Change service account for Managed Service for Kubernetes nodes. -
--version
: Change Kubernetes version. -
--network-interface
: Network settings:security-group-ids
: IDs of Security groups.subnets
: Names of subnets that will host the nodes.ipv4-address
: Method of assigning an IPv4 address.ipv6-address
: Method of assigning an IPv6 address.
ipv4-address
andipv6-address
determine the method of assigning an IP address:auto
: Only the internal IP address is assigned to the node.nat
: Public and internal IP addresses are assigned to the node.
-
--network-acceleration-type
: Change network acceleration type:-
standard
: No acceleration. -
software-accelerated
: Software-accelerated network.Warning
Before activating a software-accelerated network, make sure that you have sufficient cloud resources available to create an additional Managed Service for Kubernetes node.
-
-
--node-name
: Change name template for Managed Service for Kubernetes nodes. The name is unique if the template contains at least one of the following variables:{instance_group.id}
: Instance group ID.{instance.index}
: Unique instance number in the instance group. Possible values: 1 to N, where N is the number of instances in the group.{instance.index_in_zone}
: Instance number in a zone. It's unique for a specific instance group within the zone.{instance.short_id}
: Instance ID that is unique within the group. Consists of four letters.{instance.zone_id}
: Zone ID.
For example,
prod-{instance.short_id}-{instance_group.id}
. If not specified, the default value is used:{instance_group.id}-{instance.short_id}
. -
--template-labels
: Change node group cloud labels in<label_name>=<label_value>
format. You can specify multiple labels separated by commas. -
--latest-revision
: Get all available updates for the current Managed Service for Kubernetes master version. -
Scaling settings:
-
--fixed-size
: Change fixed number of nodes in a Managed Service for Kubernetes node group. -
--auto-scale
: Change automatic scaling settings of the Managed Service for Kubernetes cluster:min
: Minimum number of nodes in the group.max
: Maximum number of nodes in the group.initial
: Initial number of nodes in the group.
You cannot change the scaling type.
-
-
--auto-upgrade
: Manage automatic updates. -
Managing the maintenance window:
--anytime-maintenance-window
: Update at any time.--daily-maintenance-window
: Update daily at the selected time.--weekly-maintenance-window
: Update on selected days.
Warning
- The
user-data
metadata key is not supported for VM post-configuration or user data transmission. - To manage SSH keys, use the
ssh-keys
key. - For post-configuring nodes, use privileged DaemonSets. For example, sysctl-tuner
.
To update a Managed Service for Kubernetes node group:
-
Open the current Terraform configuration file describing the Managed Service for Kubernetes node group.
For more information about creating this file, see Creating a node group.
-
Edit the Managed Service for Kubernetes node group description properties.
-
To change the scaling settings, make the following changes in the
scale_policy
section:-
For fixed scaling, change the
fixed_scale.size
parameter. -
For automatic scaling, change the
auto_scale
section parameters:min
: Minimum number of nodes in the group.max
: Maximum number of nodes in the group.initial
: Initial number of nodes in the group.
You cannot change the scaling type.
-
-
To update the node group cloud labels, add the
instance_template.labels
section:resource "yandex_kubernetes_node_group" "<node_group_name>" { ... instance_template { ... labels { "<label_name>"="<label_value>" } } }
-
To change the Managed Service for Kubernetes node name template, update the
instance_template.name
parameter. The name is unique if the template contains at least one of the following variables:{instance_group.id}
: Instance group ID.{instance.index}
: Unique instance number in the instance group. Possible values: 1 to N, where N is the number of instances in the group.{instance.index_in_zone}
: Instance number in a zone. It's unique for a specific instance group within the zone.{instance.short_id}
: Instance ID that is unique within the group. Consists of four letters.{instance.zone_id}
: Zone ID.
For example,
prod-{instance.short_id}-{instance_group.id}
. If not specified, the default value is used:{instance_group.id}-{instance.short_id}
. -
To update DNS records:
-
Add the
instance_template.network_interface.ipv4_dns_records
section:resource "yandex_kubernetes_node_group" "<node_group_name>" { ... instance_template { network_interface { ipv4_dns_records { fqdn = "<DNS_record_FQDN>" dns_zone_id = "<DNS_zone_ID>" ttl = "<DNS_record_TTL_in_seconds>" ptr = "<PTR_record_creation>" } } } }
Where
ptr
denotes a PTR record creation:true
orfalse
.In a DNS record's FQDN, you can use a template with variables:
{instance_group.id}
: Instance group ID.{instance.index}
: Unique instance number in the instance group. Possible values: 1 to N, where N is the number of instances in the group.{instance.index_in_zone}
: Instance number in a zone. It is unique for a specific instance group within a zone.{instance.short_id}
: Instance ID that is unique within the group. It consists of four alphabetic characters.{instance.zone_id}
: Zone ID.
-
-
Make sure the configuration files are correct.
-
Using the command line, navigate to the folder that contains the up-to-date Terraform configuration files with an infrastructure plan.
-
Run the command:
terraform validate
If there are errors in the configuration files, Terraform will point to them.
-
-
Confirm updating the resources.
-
Run the command to view planned changes:
terraform plan
If the resource configuration descriptions are correct, the terminal will display a list of the resources to modify and their parameters. This is a test step. No resources are updated.
-
If you are happy with the planned changes, apply them:
-
Run the command:
terraform apply
-
Confirm the update of resources.
-
Wait for the operation to complete.
-
For more information, see the Terraform provider documentation
. -
To update a Managed Service for Kubernetes node group's properties, use the update method for the NodeGroup resource.
To update the node group cloud labels, provide their values in the nodeTemplate.labels
parameter.
To update the Managed Service for Kubernetes node name template, provide it in the nodeTemplate.name
parameter. The name is unique if the template contains at least one of the following variables:
{instance_group.id}
: Instance group ID.{instance.index}
: Unique instance number in the instance group. Possible values: 1 to N, where N is the number of instances in the group.{instance.index_in_zone}
: Instance number in a zone. It's unique for a specific instance group within the zone.{instance.short_id}
: Instance ID that is unique within the group. Consists of four letters.{instance.zone_id}
: Zone ID.
For example, prod-{instance.short_id}-{instance_group.id}
. If not specified, the default value is used: {instance_group.id}-{instance.short_id}
.
To update DNS records, provide their settings in the nodeTemplate.v4AddressSpec.dnsRecordSpecs
parameter. In a DNS record's FQDN, you can use the nodeTemplate.name
node name template with variables.
Enabling access to nodes from the internet
- Go to the folder page and select Compute Cloud.
- Click the VM name.
- Under Network, click
and select Add public IP address. - Specify the appropriate settings and click Add.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To enable access to Managed Service for Kubernetes nodes from the internet:
-
Get detailed information about the command to edit the Managed Service for Kubernetes node group:
yc managed-kubernetes node-group update --help
-
Run the node group update command with the
--network-interface
flag set:yc managed-kubernetes node-group update <node_group_ID_or_name> \ ... --network-interface subnets=<node_group_subnet_name>, ipv4-address=nat
You can find out the names and IDs of Managed Service for Kubernetes node groups from the list of node groups in the folder.
Alternatively, you can grant internet access permission to Managed Service for Kubernetes cluster nodes by creating and setting up a NAT gateway or NAT instance. As a result, through static routing, traffic will be routed via the gateway or a separate VM instance with NAT features.
Note
If you assigned public IP addresses to the cluster nodes and then configured the NAT gateway or NAT instance, internet access via the public IP addresses will be disabled. For more information, see the Yandex Virtual Private Cloud documentation.
Placing a taint on a node group
Adding taints results in recreation of a Managed Service for Kubernetes node group. First, all nodes in the group are deleted, then nodes with the taint are added to the group.
To place a taint on a node group:
-
Open the current Terraform configuration file describing the Managed Service for Kubernetes node group.
For more information about creating this file, see Creating a node group.
-
Add the
node_taints
section to the node group description:resource "yandex_kubernetes_node_group" "<node_group_name>" { ... node_taints = [ "<key>=<value>:<taint_effect>", ... ] ... }
Specify a key and value. Select one of the available taint effects:
NoSchedule
: Prohibit running new pods on the group's nodes (it does not affect the running ones).PreferNoSchedule
: Avoid running pods on the group's nodes if there are resources available for this purpose in other groups.NoExecute
: Stop pods on the group's nodes, evict them to other groups, and prohibit running new pods.
You can place multiple taints by specifying them separated by commas.
-
Make sure the configuration files are correct.
-
Using the command line, navigate to the folder that contains the up-to-date Terraform configuration files with an infrastructure plan.
-
Run the command:
terraform validate
If there are errors in the configuration files, Terraform will point to them.
-
-
Confirm updating the resources.
-
Run the command to view planned changes:
terraform plan
If the resource configuration descriptions are correct, the terminal will display a list of the resources to modify and their parameters. This is a test step. No resources are updated.
-
If you are happy with the planned changes, apply them:
-
Run the command:
terraform apply
-
Confirm the update of resources.
-
Wait for the operation to complete.
-
For more information, see the Terraform provider documentation
. -
To place a taint on a node group, use the update method for the NodeGroup and provide the following in the request:
- Taints in the
nodeTaints
parameter. - The updatable
nodeTaints
parameter in theupdateMask
parameter.
Warning
The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the updateMask
parameter as a single comma-separated string.
Removing a taint from a node group
Removing taints results in recreation of a Managed Service for Kubernetes node group. First, all nodes in the group are deleted, then nodes with the new configuration are added to the group.
To remove a taint from a node group:
-
Open the current Terraform configuration file describing the Managed Service for Kubernetes node group.
For more information about creating this file, see Creating a node group.
-
In the node group description, remove the taints you no longer need under
node_taints
. -
Make sure the configuration files are correct.
-
Using the command line, navigate to the folder that contains the up-to-date Terraform configuration files with an infrastructure plan.
-
Run the command:
terraform validate
If there are errors in the configuration files, Terraform will point to them.
-
-
Confirm updating the resources.
-
Run the command to view planned changes:
terraform plan
If the resource configuration descriptions are correct, the terminal will display a list of the resources to modify and their parameters. This is a test step. No resources are updated.
-
If you are happy with the planned changes, apply them:
-
Run the command:
terraform apply
-
Confirm the update of resources.
-
Wait for the operation to complete.
-
For more information, see the Terraform provider documentation
. -
To remove a taint from a node group, use the update method for the NodeGroup and provide the following in the request:
- A new set of taints in the
nodeTaints
parameter. If you want to remove all taints, put"nodeTaints": []
in the request. nodeTaints
parameter to update in theupdateMask
parameter.
Warning
The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the updateMask
parameter as a single comma-separated string.
Managing node group cloud labels
You can perform the following actions with cloud labels of Managed Service for Kubernetes node groups:
Adding a cloud label
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
Add a cloud label to a Managed Service for Kubernetes node group:
yc managed-kubernetes node-group add-labels my-node-group --labels new_label=test_label
Result:
done (28s)
id: catpl8c44kii********
cluster_id: catcsqidoos7********
...
-
Open the current Terraform configuration file describing the Managed Service for Kubernetes node group.
For more information about creating this file, see Creating a node group.
-
Add the
labels
parameter to the Managed Service for Kubernetes node group description:resource "yandex_kubernetes_node_group" "<node_group_name>" { cluster_id = yandex_kubernetes_cluster.<cluster_name>.id ... labels = { "<cloud_label>" = "<value>" } ... }
-
Make sure the configuration files are correct.
-
Using the command line, navigate to the folder that contains the up-to-date Terraform configuration files with an infrastructure plan.
-
Run the command:
terraform validate
If there are errors in the configuration files, Terraform will point to them.
-
-
Confirm updating the resources.
-
Run the command to view planned changes:
terraform plan
If the resource configuration descriptions are correct, the terminal will display a list of the resources to modify and their parameters. This is a test step. No resources are updated.
-
If you are happy with the planned changes, apply them:
-
Run the command:
terraform apply
-
Confirm the update of resources.
-
Wait for the operation to complete.
-
-
For more information, see the Terraform provider documentation
Updating a cloud label
Update a cloud label of a Managed Service for Kubernetes node group:
Warning
The existing labels
will be completely overwritten by the ones you provide in your request.
yc managed-kubernetes node-group update my-node-group --labels test_label=my_ng_label
Result:
done (3s)
id: catpl8c44kii********
cluster_id: catcsqidoos7********
...
-
Open the current Terraform configuration file describing the Managed Service for Kubernetes node group.
For more information about creating this file, see Creating a node group.
-
Edit the
labels
property in the Managed Service for Kubernetes node group description:resource "yandex_kubernetes_node_group" "<node_group_name>" { cluster_id = yandex_kubernetes_cluster.<cluster_name>.id ... labels = { "<cloud_label>" = "<value>" ... } ... }
-
Make sure the configuration files are correct.
-
Using the command line, navigate to the folder that contains the up-to-date Terraform configuration files with an infrastructure plan.
-
Run the command:
terraform validate
If there are errors in the configuration files, Terraform will point to them.
-
-
Confirm updating the resources.
-
Run the command to view planned changes:
terraform plan
If the resource configuration descriptions are correct, the terminal will display a list of the resources to modify and their parameters. This is a test step. No resources are updated.
-
If you are happy with the planned changes, apply them:
-
Run the command:
terraform apply
-
Confirm the update of resources.
-
Wait for the operation to complete.
-
-
For more information, see the Terraform provider documentation
Deleting a cloud label
Delete a cloud label of a Managed Service for Kubernetes node group:
yc managed-kubernetes node-group remove-labels my-node-group --labels test_label
Result:
done (2s)
id: catpl8c44kii********
cluster_id: catcsqidoos7********
...
-
Open the current Terraform configuration file describing the Managed Service for Kubernetes node group.
For more information about creating this file, see Creating a node group.
-
In the Managed Service for Kubernetes node group description, delete the cloud labels you no longer need under
labels
. -
Make sure the configuration files are correct.
-
Using the command line, navigate to the folder that contains the up-to-date Terraform configuration files with an infrastructure plan.
-
Run the command:
terraform validate
If there are errors in the configuration files, Terraform will point to them.
-
-
Confirm updating the resources.
-
Run the command to view planned changes:
terraform plan
If the resource configuration descriptions are correct, the terminal will display a list of the resources to modify and their parameters. This is a test step. No resources are updated.
-
If you are happy with the planned changes, apply them:
-
Run the command:
terraform apply
-
Confirm the update of resources.
-
Wait for the operation to complete.
-
-
For more information, see the Terraform provider documentation
Changing the method of connecting to nodes in a node group
Note
After the connection method is changed, the node group status will temporarily change to Reconciling
: all the group's nodes will be recreated for the changes to take effect.
-
Open Managed Service for Kubernetes in the folder where you want to update the Managed Service for Kubernetes cluster.
-
Click the name of the Managed Service for Kubernetes cluster.
-
Go to the Node group tab.
-
Select the required node group.
-
Click Edit in the top-right corner.
-
Change the connection method settings:
-
To enable or disable access to nodes via OS Login, use the Access by OS Login option.
Warning
If access via OS Login is enabled, access via SSH keys will be unavailable.
For more on configuring and using OS Login, see Connecting to a node via OS Login.
-
To enable access to nodes using SSH keys:
- Make sure that access via OS Login is disabled.
- Make sure that the node group metadata contains at least one SSH key. If needed, add or delete keys by changing the metadata with the
ssh-keys
key.
For more on preparing, configuring, and using SSH keys, see Connecting to a node over SSH.
-
To disable access to nodes using SSH keys, do any one of the following:
-
Enable access via OS Login.
-
Change metadata by deleting the metadata with the
ssh-keys
key.After deleting this metadata, you will not be able to connect to the Managed Service for Kubernetes cluster nodes until you add one or more SSH keys.
-
-
-
Click Save.
-
To enable or disable access to nodes via OS Login, change the metadata value with the
enable-oslogin
key:true
: Access enabled.false
: Access disabled.
Warning
If access via OS Login is enabled, access via SSH keys will be unavailable.
For more on configuring and using OS Login, see Connecting to a node via OS Login.
-
To enable access to nodes using SSH keys:
- Make sure that access via OS Login is disabled.
- Make sure that the node group metadata contains at least one SSH key. If needed, add or delete keys by changing the metadata with the
ssh-keys
key.
For more on preparing, configuring, and using SSH keys, see Connecting to a node over SSH.
-
To disable access to nodes using SSH keys, do any one of the following:
-
Enable access via OS Login.
-
Change metadata by deleting the metadata with the
ssh-keys
key.After deleting this metadata, you will not be able to connect to the Managed Service for Kubernetes cluster nodes until you add one or more SSH keys.
-
-
To enable or disable access to nodes via OS Login, change the metadata value with the
enable-oslogin
key:true
: Access enabled.false
: Access disabled.
Warning
If access via OS Login is enabled, access via SSH keys will be unavailable.
For more on configuring and using OS Login, see Connecting to a node via OS Login.
-
To enable access to nodes using SSH keys:
- Make sure that access via OS Login is disabled.
- Make sure that the node group metadata contains at least one SSH key. If needed, add or delete keys by changing the metadata with the
ssh-keys
key.
For more on preparing, configuring, and using SSH keys, see Connecting to a node over SSH.
-
To disable access to nodes using SSH keys, do any one of the following:
-
Enable access via OS Login.
-
Change metadata by deleting the metadata with the
ssh-keys
key.After deleting this metadata, you will not be able to connect to the Managed Service for Kubernetes cluster nodes until you add one or more SSH keys.
-
-
To enable or disable access to nodes via OS Login, change the metadata value with the
enable-oslogin
key:true
: Access enabled.false
: Access disabled.
Warning
If access via OS Login is enabled, access via SSH keys will be unavailable.
For more on configuring and using OS Login, see Connecting to a node via OS Login.
-
To enable access to nodes using SSH keys:
- Make sure that access via OS Login is disabled.
- Make sure that the node group metadata contains at least one SSH key. If needed, add or delete keys by changing the metadata with the
ssh-keys
key.
For more on preparing, configuring, and using SSH keys, see Connecting to a node over SSH.
-
To disable access to nodes using SSH keys, do any one of the following:
-
Enable access via OS Login.
-
Change metadata by deleting the metadata with the
ssh-keys
key.After deleting this metadata, you will not be able to connect to the Managed Service for Kubernetes cluster nodes until you add one or more SSH keys.
-
Changing metadata
Warning
Metadata settings can affect the behavior and health of the group's nodes. Change these settings only if you know exactly what you want to do.
Providing user data in the metadata with the user-data
key is not supported.
After you change the metadata, the node group status will temporarily change to Reconciling
: all the group's nodes will be recreated for the changes to take effect.
-
Open Managed Service for Kubernetes in the folder where you want to update the Managed Service for Kubernetes cluster.
-
Click the name of the Managed Service for Kubernetes cluster.
-
Go to the Node group tab.
-
Select the required node group.
-
Click Edit in the top-right corner.
-
Open the Metadata block and edit, add, or remove metadata for the nodes.
To add metadata, click Add field. Specify the key and value for each metadata element in a separate set of fields.
-
Click Save.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
-
To add or modify metadata with a specific key:
-
View the description of the CLI command for adding and updating the Managed Service for Kubernetes node group metadata:
yc managed-kubernetes node-group add-metadata --help
-
To add new or modify existing metadata, run the following command:
yc managed-kubernetes node-group add-metadata \ --name <node_group_name> \ --metadata <key>=<value>
You can request the name of a node group with a list of node groups in the folder.
You can request a list of existing metadata with detailed information about the node group.
Tip
Use the
--metadata-from-file
parameter instead of--metadata
to get a value from a file:--metadata-from-file <key>=<path_to_file_with_value>
The key value will be read from a file. This may be of use if the value is too long to provide it explicitly or contains line breaks or other special characters.
-
-
To delete metadata with a specific key:
-
See the description of the CLI command to delete the Managed Service for Kubernetes node group metadata:
yc managed-kubernetes node-group remove-metadata --help
-
Delete existing metadata:
yc managed-kubernetes node-group remove-metadata \ --name <node_group_name> \ --keys <key>
You can request the name of a node group with a list of node groups in the folder.
You can request a list of existing metadata with detailed information about the node group.
-
-
Open the current Terraform configuration file describing the Managed Service for Kubernetes node group.
For more information about creating this file, see Creating a node group.
-
To add, modify, or delete metadata with a specific key, edit the list of keys and values in the
instance_template.metadata
parameter. If there is no such parameter, add it.resource "yandex_kubernetes_node_group" "<node_group_name>" { cluster_id = yandex_kubernetes_cluster.<cluster_name>.id ... instance_template { metadata = { "<key>" = "<value>" ... } ... } ... }
Tip
Use the
file()
function to get a value from a file:"<key>" = file("<path_to_file_with_value>")
The key value will be read from a file. This may be of use if the value is too long to provide it explicitly or contains line breaks or other special characters.
-
Make sure the configuration files are correct.
-
Using the command line, navigate to the folder that contains the up-to-date Terraform configuration files with an infrastructure plan.
-
Run the command:
terraform validate
If there are errors in the configuration files, Terraform will point to them.
-
-
Confirm updating the resources.
-
Run the command to view planned changes:
terraform plan
If the resource configuration descriptions are correct, the terminal will display a list of the resources to modify and their parameters. This is a test step. No resources are updated.
-
If you are happy with the planned changes, apply them:
-
Run the command:
terraform apply
-
Confirm the update of resources.
-
Wait for the operation to complete.
-
-
For more information, see the Terraform provider documentation
-
Get all the existing metadata for the node group using the get REST API method for the NodeGroup resource, and provide the node group ID in the
nodeGroupId
request parameter.You can request the name of a node group with a list of node groups in the folder.
The metadata will be listed as
key=value
pairs in thenodeTemplate.metadata
field of the response. -
Use the update REST API method for the NodeGroup resource and include the following in the request:
-
Node group ID in the
nodeGroupId
parameter. -
The
updateMask
parameter set tonodeTemplate.metadata
.Warning
The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the
updateMask
parameter as a single comma-separated string. -
The
nodeTemplate.metadata
parameter listing the node group's metadata.Make the required changes to the metadata list you got in the previous step: add, modify, or delete
key=value
pairs. Then provide the updated list in thenodeTemplate.metadata
parameter.Alert
Metadata not listed in the
nodeTemplate.metadata
parameter will be deleted.
-