Updates an Amazon EKS managed node group configuration. Your node group continues to function during the update. The response output includes an update ID that you can use to track the status of your node group update with the DescribeUpdate API operation. Currently you can update the Kubernetes labels for a node group or the scaling configuration.
See also: AWS API Documentation
update-nodegroup-config
--cluster-name <value>
--nodegroup-name <value>
[--labels <value>]
[--taints <value>]
[--scaling-config <value>]
[--update-config <value>]
[--node-repair-config <value>]
[--client-request-token <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
[--cli-binary-format <value>]
[--no-cli-pager]
[--cli-auto-prompt]
[--no-cli-auto-prompt]
--cluster-name
(string)
The name of your cluster.
--nodegroup-name
(string)
The name of the managed node group to update.
--labels
(structure)
The Kubernetes
labels
to apply to the nodes in the node group after the update.addOrUpdateLabels -> (map)
The Kubernetes
labels
to add or update.key -> (string)
value -> (string)
removeLabels -> (list)
The Kubernetes
labels
to remove.(string)
Shorthand Syntax:
addOrUpdateLabels={KeyName1=string,KeyName2=string},removeLabels=string,string
JSON Syntax:
{
"addOrUpdateLabels": {"string": "string"
...},
"removeLabels": ["string", ...]
}
--taints
(structure)
The Kubernetes taints to be applied to the nodes in the node group after the update. For more information, see Node taints on managed node groups .
addOrUpdateTaints -> (list)
Kubernetes taints to be added or updated.
(structure)
A property that allows a node to repel a
Pod
. For more information, see Node taints on managed node groups in the Amazon EKS User Guide .key -> (string)
The key of the taint.value -> (string)
The value of the taint.effect -> (string)
The effect of the taint.removeTaints -> (list)
Kubernetes taints to remove.
(structure)
A property that allows a node to repel a
Pod
. For more information, see Node taints on managed node groups in the Amazon EKS User Guide .key -> (string)
The key of the taint.value -> (string)
The value of the taint.effect -> (string)
The effect of the taint.
Shorthand Syntax:
addOrUpdateTaints=[{key=string,value=string,effect=string},{key=string,value=string,effect=string}],removeTaints=[{key=string,value=string,effect=string},{key=string,value=string,effect=string}]
JSON Syntax:
{
"addOrUpdateTaints": [
{
"key": "string",
"value": "string",
"effect": "NO_SCHEDULE"|"NO_EXECUTE"|"PREFER_NO_SCHEDULE"
}
...
],
"removeTaints": [
{
"key": "string",
"value": "string",
"effect": "NO_SCHEDULE"|"NO_EXECUTE"|"PREFER_NO_SCHEDULE"
}
...
]
}
--scaling-config
(structure)
The scaling configuration details for the Auto Scaling group after the update.
minSize -> (integer)
The minimum number of nodes that the managed node group can scale in to.maxSize -> (integer)
The maximum number of nodes that the managed node group can scale out to. For information about the maximum number that you can specify, see Amazon EKS service quotas in the Amazon EKS User Guide .desiredSize -> (integer)
The current number of nodes that the managed node group should maintain.
Warning
If you use the Kubernetes Cluster Autoscaler , you shouldn’t change thedesiredSize
value directly, as this can cause the Cluster Autoscaler to suddenly scale up or scale down.Whenever this parameter changes, the number of worker nodes in the node group is updated to the specified size. If this parameter is given a value that is smaller than the current number of running worker nodes, the necessary number of worker nodes are terminated to match the given value. When using CloudFormation, no action occurs if you remove this parameter from your CFN template.
This parameter can be different from
minSize
in some cases, such as when starting with extra hosts for testing. This parameter can also be different when you want to start with an estimated number of needed hosts, but let the Cluster Autoscaler reduce the number if there are too many. When the Cluster Autoscaler is used, thedesiredSize
parameter is altered by the Cluster Autoscaler (but can be out-of-date for short periods of time). the Cluster Autoscaler doesn’t scale a managed node group lower thanminSize
or higher thanmaxSize
.
Shorthand Syntax:
minSize=integer,maxSize=integer,desiredSize=integer
JSON Syntax:
{
"minSize": integer,
"maxSize": integer,
"desiredSize": integer
}
--update-config
(structure)
The node group update configuration.
maxUnavailable -> (integer)
The maximum number of nodes unavailable at once during a version update. Nodes are updated in parallel. This value ormaxUnavailablePercentage
is required to have a value.The maximum number is 100.maxUnavailablePercentage -> (integer)
The maximum percentage of nodes unavailable during a version update. This percentage of nodes are updated in parallel, up to 100 nodes at once. This value ormaxUnavailable
is required to have a value.
Shorthand Syntax:
maxUnavailable=integer,maxUnavailablePercentage=integer
JSON Syntax:
{
"maxUnavailable": integer,
"maxUnavailablePercentage": integer
}
--node-repair-config
(structure)
The node auto repair configuration for the node group.
enabled -> (boolean)
Specifies whether to enable node auto repair for the node group. Node auto repair is disabled by default.
Shorthand Syntax:
enabled=boolean
JSON Syntax:
{
"enabled": true|false
}
--client-request-token
(string)
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
--cli-input-json
| --cli-input-yaml
(string)
Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton
. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml
.
--generate-cli-skeleton
(string)
Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input
, prints a sample input JSON that can be used as an argument for --cli-input-json
. Similarly, if provided yaml-input
it will print a sample input YAML that can be used with --cli-input-yaml
. If provided with the value output
, it validates the command inputs and returns a sample output JSON for that command. The generated JSON skeleton is not stable between versions of the AWS CLI and there are no backwards compatibility guarantees in the JSON skeleton generated.
--debug
(boolean)
Turn on debug logging.
--endpoint-url
(string)
Override command’s default URL with the given URL.
--no-verify-ssl
(boolean)
By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.
--no-paginate
(boolean)
Disable automatic pagination. If automatic pagination is disabled, the AWS CLI will only make one call, for the first page of results.
--output
(string)
The formatting style for command output.
--query
(string)
A JMESPath query to use in filtering the response data.
--profile
(string)
Use a specific profile from your credential file.
--region
(string)
The region to use. Overrides config/env settings.
--version
(string)
Display the version of this tool.
--color
(string)
Turn on/off color output.
--no-sign-request
(boolean)
Do not sign requests. Credentials will not be loaded if this argument is provided.
--ca-bundle
(string)
The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.
--cli-read-timeout
(int)
The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.
--cli-connect-timeout
(int)
The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.
--cli-binary-format
(string)
The formatting style to be used for binary blobs. The default format is base64. The base64 format expects binary blobs to be provided as a base64 encoded string. The raw-in-base64-out format preserves compatibility with AWS CLI V1 behavior and binary values must be passed literally. When providing contents from a file that map to a binary blob fileb://
will always be treated as binary and use the file contents directly regardless of the cli-binary-format
setting. When using file://
the file contents will need to properly formatted for the configured cli-binary-format
.
--no-cli-pager
(boolean)
Disable cli pager for output.
--cli-auto-prompt
(boolean)
Automatically prompt for CLI input parameters.
--no-cli-auto-prompt
(boolean)
Disable automatically prompt for CLI input parameters.
To use the following examples, you must have the AWS CLI installed and configured. See the Getting started guide in the AWS CLI User Guide for more information.
Unless otherwise stated, all examples have unix-like quotation rules. These examples will need to be adapted to your terminal’s quoting rules. See Using quotation marks with strings in the AWS CLI User Guide .
Example 1: Update a managed node group to add new labels and taint to EKS worker node for an Amazon EKS cluster
The following update-nodegroup-config
example updates a managed node group to add new labels and taint to EKS worker node for an Amazon EKS cluster.
aws eks update-nodegroup-config \
--cluster-name my-eks-cluster \
--nodegroup-name my-eks-nodegroup \
--labels 'addOrUpdateLabels={my-eks-nodegroup-label-1=value-1,my-eks-nodegroup-label-2=value-2}' \
--taints 'addOrUpdateTaints=[{key=taint-key-1,value=taint-value-1,effect=NO_EXECUTE}]'
Output:
{
"update": {
"id": "e66d21d3-bd8b-3ad1-a5aa-b196dc08c7c1",
"status": "InProgress",
"type": "ConfigUpdate",
"params": [
{
"type": "LabelsToAdd",
"value": "{\"my-eks-nodegroup-label-2\":\"value-2\",\"my-eks-nodegroup-label-1\":\"value-1\"}"
},
{
"type": "TaintsToAdd",
"value": "[{\"effect\":\"NO_EXECUTE\",\"value\":\"taint-value-1\",\"key\":\"taint-key-1\"}]"
}
],
"createdAt": "2024-04-08T12:05:19.161000-04:00",
"errors": []
}
}
For more information, see Updating a managed node group in the Amazon EKS User Guide.
Example 2: Update a managed node group to remove labels and taint for the EKS worker node for an Amazon EKS cluster
The following update-nodegroup-config
example updates a managed node group to remove labels and taint for the EKS worker node for an Amazon EKS cluster.
aws eks update-nodegroup-config \
--cluster-name my-eks-cluster \
--nodegroup-name my-eks-nodegroup \
--labels 'removeLabels=my-eks-nodegroup-label-1, my-eks-nodegroup-label-2' \
--taints 'removeTaints=[{key=taint-key-1,value=taint-value-1,effect=NO_EXECUTE}]'
Output:
{
"update": {
"id": "67a08692-9e59-3ace-a916-13929f44cec3",
"status": "InProgress",
"type": "ConfigUpdate",
"params": [
{
"type": "LabelsToRemove",
"value": "[\"my-eks-nodegroup-label-1\",\"my-eks-nodegroup-label-2\"]"
},
{
"type": "TaintsToRemove",
"value": "[{\"effect\":\"NO_EXECUTE\",\"value\":\"taint-value-1\",\"key\":\"taint-key-1\"}]"
}
],
"createdAt": "2024-04-08T12:17:31.817000-04:00",
"errors": []
}
}
For more information, see Updating a managed node group in the Amazon EKS User Guide.
Example 3: Update a managed node group to remove and add labels and taint for the EKS worker node for an Amazon EKS cluster
The following update-nodegroup-config
example updates a managed node group to remove and add labels and taint for the EKS worker node for an Amazon EKS cluster.
aws eks update-nodegroup-config \
--cluster-name my-eks-cluster \
--nodegroup-name my-eks-nodegroup \
--labels 'addOrUpdateLabels={my-eks-nodegroup-new-label-1=new-value-1,my-eks-nodegroup-new-label-2=new-value-2},removeLabels=my-eks-nodegroup-label-1, my-eks-nodegroup-label-2' \
--taints 'addOrUpdateTaints=[{key=taint-new-key-1,value=taint-new-value-1,effect=PREFER_NO_SCHEDULE}],removeTaints=[{key=taint-key-1,value=taint-value-1,effect=NO_EXECUTE}]'
Output:
{
"update": {
"id": "4a9c8c45-6ac7-3115-be71-d6412a2339b7",
"status": "InProgress",
"type": "ConfigUpdate",
"params": [
{
"type": "LabelsToAdd",
"value": "{\"my-eks-nodegroup-new-label-1\":\"new-value-1\",\"my-eks-nodegroup-new-label-2\":\"new-value-2\"}"
},
{
"type": "LabelsToRemove",
"value": "[\"my-eks-nodegroup-label-1\",\"my-eks-nodegroup-label-2\"]"
},
{
"type": "TaintsToAdd",
"value": "[{\"effect\":\"PREFER_NO_SCHEDULE\",\"value\":\"taint-new-value-1\",\"key\":\"taint-new-key-1\"}]"
},
{
"type": "TaintsToRemove",
"value": "[{\"effect\":\"NO_EXECUTE\",\"value\":\"taint-value-1\",\"key\":\"taint-key-1\"}]"
}
],
"createdAt": "2024-04-08T12:30:55.486000-04:00",
"errors": []
}
}
For more information, see Updating a managed node group in the Amazon EKS User Guide.
Example 4: Update a managed node group to update scaling-config and update-config for the EKS worker node for an Amazon EKS cluster
The following update-nodegroup-config
example updates a managed node group to update scaling-config and update-config for the EKS worker node for an Amazon EKS cluster.
aws eks update-nodegroup-config \
--cluster-name my-eks-cluster \
--nodegroup-name my-eks-nodegroup \
--scaling-config minSize=1,maxSize=5,desiredSize=2 \
--update-config maxUnavailable=2
Output:
{
"update": {
"id": "a977160f-59bf-3023-805d-c9826e460aea",
"status": "InProgress",
"type": "ConfigUpdate",
"params": [
{
"type": "MinSize",
"value": "1"
},
{
"type": "MaxSize",
"value": "5"
},
{
"type": "DesiredSize",
"value": "2"
},
{
"type": "MaxUnavailable",
"value": "2"
}
],
"createdAt": "2024-04-08T12:35:17.036000-04:00",
"errors": []
}
}
For more information, see Updating a managed node group in the Amazon EKS User Guide.
update -> (structure)
An object representing an asynchronous update.
id -> (string)
A UUID that is used to track the update.status -> (string)
The current status of the update.type -> (string)
The type of the update.params -> (list)
A key-value map that contains the parameters associated with the update.
(structure)
An object representing the details of an update request.
type -> (string)
The keys associated with an update request.value -> (string)
The value of the keys submitted as part of an update request.createdAt -> (timestamp)
The Unix epoch timestamp at object creation.errors -> (list)
Any errors associated with a
Failed
update.(structure)
An object representing an error when an asynchronous operation fails.
errorCode -> (string)
A brief description of the error.
- SubnetNotFound : We couldn’t find one of the subnets associated with the cluster.
- SecurityGroupNotFound : We couldn’t find one of the security groups associated with the cluster.
- EniLimitReached : You have reached the elastic network interface limit for your account.
- IpNotAvailable : A subnet associated with the cluster doesn’t have any available IP addresses.
- AccessDenied : You don’t have permissions to perform the specified operation.
- OperationNotPermitted : The service role associated with the cluster doesn’t have the required access permissions for Amazon EKS.
- VpcIdNotFound : We couldn’t find the VPC associated with the cluster.
errorMessage -> (string)
A more complete description of the error.resourceIds -> (list)
An optional field that contains the resource IDs associated with the error.
(string)