EKS / Client / update_nodegroup_config
update_nodegroup_config#
- EKS.Client.update_nodegroup_config(**kwargs)#
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
Request Syntax
response = client.update_nodegroup_config( clusterName='string', nodegroupName='string', labels={ 'addOrUpdateLabels': { 'string': 'string' }, 'removeLabels': [ 'string', ] }, taints={ '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' }, ] }, scalingConfig={ 'minSize': 123, 'maxSize': 123, 'desiredSize': 123 }, updateConfig={ 'maxUnavailable': 123, 'maxUnavailablePercentage': 123 }, clientRequestToken='string' )
- Parameters:
clusterName (string) –
[REQUIRED]
The name of your cluster.
nodegroupName (string) –
[REQUIRED]
The name of the managed node group to update.
labels (dict) –
The Kubernetes
labels
to apply to the nodes in the node group after the update.addOrUpdateLabels (dict) –
The Kubernetes
labels
to add or update.(string) –
(string) –
removeLabels (list) –
The Kubernetes
labels
to remove.(string) –
taints (dict) –
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.
(dict) –
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.
(dict) –
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.
scalingConfig (dict) –
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 the
desiredSize
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
.
updateConfig (dict) –
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 or
maxUnavailablePercentage
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 or
maxUnavailable
is required to have a value.
clientRequestToken (string) –
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
This field is autopopulated if not provided.
- Return type:
dict
- Returns:
Response Syntax
{ 'update': { 'id': 'string', 'status': 'InProgress'|'Failed'|'Cancelled'|'Successful', 'type': 'VersionUpdate'|'EndpointAccessUpdate'|'LoggingUpdate'|'ConfigUpdate'|'AssociateIdentityProviderConfig'|'DisassociateIdentityProviderConfig'|'AssociateEncryptionConfig'|'AddonUpdate'|'VpcConfigUpdate'|'AccessConfigUpdate'|'UpgradePolicyUpdate', 'params': [ { 'type': 'Version'|'PlatformVersion'|'EndpointPrivateAccess'|'EndpointPublicAccess'|'ClusterLogging'|'DesiredSize'|'LabelsToAdd'|'LabelsToRemove'|'TaintsToAdd'|'TaintsToRemove'|'MaxSize'|'MinSize'|'ReleaseVersion'|'PublicAccessCidrs'|'LaunchTemplateName'|'LaunchTemplateVersion'|'IdentityProviderConfig'|'EncryptionConfig'|'AddonVersion'|'ServiceAccountRoleArn'|'ResolveConflicts'|'MaxUnavailable'|'MaxUnavailablePercentage'|'ConfigurationValues'|'SecurityGroups'|'Subnets'|'AuthenticationMode'|'PodIdentityAssociations'|'UpgradePolicy', 'value': 'string' }, ], 'createdAt': datetime(2015, 1, 1), 'errors': [ { 'errorCode': 'SubnetNotFound'|'SecurityGroupNotFound'|'EniLimitReached'|'IpNotAvailable'|'AccessDenied'|'OperationNotPermitted'|'VpcIdNotFound'|'Unknown'|'NodeCreationFailure'|'PodEvictionFailure'|'InsufficientFreeAddresses'|'ClusterUnreachable'|'InsufficientNumberOfReplicas'|'ConfigurationConflict'|'AdmissionRequestDenied'|'UnsupportedAddonModification'|'K8sResourceNotFound', 'errorMessage': 'string', 'resourceIds': [ 'string', ] }, ] } }
Response Structure
(dict) –
update (dict) –
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.
(dict) –
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 (datetime) –
The Unix epoch timestamp at object creation.
errors (list) –
Any errors associated with a
Failed
update.(dict) –
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) –
Exceptions