Amazon Elastic Kubernetes Service
API Reference (API Version 2017-11-01)

UpdateNodegroupVersion

Updates the Kubernetes version or AMI version of an Amazon EKS managed node group.

You can update to the latest available AMI version of a node group's current Kubernetes version by not specifying a Kubernetes version in the request. You can update to the latest AMI version of your cluster's current Kubernetes version by specifying your cluster's Kubernetes version in the request. For more information, see Amazon EKS-Optimized Linux AMI Versions in the Amazon EKS User Guide.

You cannot roll back a node group to an earlier Kubernetes version or AMI version.

When a node in a managed node group is terminated due to a scaling action or update, the pods in that node are drained first. Amazon EKS attempts to drain the nodes gracefully and will fail if it is unable to do so. You can force the update if Amazon EKS is unable to drain the nodes as a result of a pod disruption budget issue.

Request Syntax

POST /clusters/name/node-groups/nodegroupName/update-version HTTP/1.1 Content-type: application/json { "clientRequestToken": "string", "force": boolean, "releaseVersion": "string", "version": "string" }

URI Request Parameters

The request requires the following URI parameters.

name

The name of the Amazon EKS cluster that is associated with the managed node group to update.

nodegroupName

The name of the managed node group to update.

Request Body

The request accepts the following data in JSON format.

clientRequestToken

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Type: String

Required: No

force

Force the update if the existing node group's pods are unable to be drained due to a pod disruption budget issue. If an update fails because pods could not be drained, you can force the update after it fails to terminate the old node whether or not any pods are running on the node.

Type: Boolean

Required: No

releaseVersion

The AMI version of the Amazon EKS-optimized AMI to use for the update. By default, the latest available AMI version for the node group's Kubernetes version is used. For more information, see Amazon EKS-Optimized Linux AMI Versions in the Amazon EKS User Guide.

Type: String

Required: No

version

The Kubernetes version to update to. If no version is specified, then the Kubernetes version of the node group does not change. You can specify the Kubernetes version of the cluster to update the node group to the latest AMI version of the cluster's Kubernetes version.

Type: String

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "update": { "createdAt": number, "errors": [ { "errorCode": "string", "errorMessage": "string", "resourceIds": [ "string" ] } ], "id": "string", "params": [ { "type": "string", "value": "string" } ], "status": "string", "type": "string" } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

update

An object representing an asynchronous update.

Type: Update object

Errors

For information about the errors that are common to all actions, see Common Errors.

ClientException

These errors are usually caused by a client action. Actions can include using an action or resource on behalf of a user that doesn't have permissions to use the action or resource or specifying an identifier that is not valid.

HTTP Status Code: 400

InvalidParameterException

The specified parameter is invalid. Review the available parameters for the API request.

HTTP Status Code: 400

InvalidRequestException

The request is invalid given the state of the cluster. Check the state of the cluster and the associated operations.

HTTP Status Code: 400

ResourceInUseException

The specified resource is in use.

HTTP Status Code: 409

ResourceNotFoundException

The specified resource could not be found. You can view your available clusters with ListClusters. You can view your available managed node groups with ListNodegroups. Amazon EKS clusters and node groups are Region-specific.

HTTP Status Code: 404

ServerException

These errors are usually caused by a server-side issue.

HTTP Status Code: 500

Example

In the following example or examples, the Authorization header contents (AUTHPARAMS) must be replaced with an AWS Signature Version 4 signature. For more information about creating these signatures, see Signature Version 4 Signing Process in the AWS General Reference.

You need to learn how to sign HTTP requests only if you intend to manually create them. When you use the AWS Command Line Interface (AWS CLI) or one of the AWS SDKs to make requests to AWS, these tools automatically sign the requests for you with the access key that you specify when you configure the tools. When you use these tools, you don't need to learn how to sign requests yourself.

Example

This example updates to the latest available node group AMI version for the node group's current Kubernetes version. The example node group is called standard and is in the prod cluster.

Sample Request

POST /clusters/prod/node-groups/standard/update-version HTTP/1.1 Host: eks.us-west-2.amazonaws.com Accept-Encoding: identity User-Agent: aws-cli/1.16.275 Python/3.7.4 Darwin/18.7.0 botocore/1.13.11 X-Amz-Date: 20191111T184043Z Authorization: AUTHPARAMS Content-Length: 62 { "clientRequestToken": "9415e884-8819-4494-b6a6-1082cdd38fab" }

Sample Response

HTTP/1.1 200 OK Date: Mon, 11 Nov 2019 18:40:43 GMT Content-Type: application/json Content-Length: 237 x-amzn-RequestId: f512f080-330f-4e9a-adc0-327eef5dd45e x-amz-apigw-id: DAeuxEBkvHcF1sg= X-Amzn-Trace-Id: Root=1-5dc9ab2b-f40979aca769f4149a201678 Connection: keep-alive { "update": { "id": "079be772-956e-37c4-a966-960c1a6755a5", "status": "InProgress", "type": "VersionUpdate", "params": [ { "type": "Version", "value": "1.14" }, { "type": "ReleaseVersion", "value": "1.14.7-20190927" } ], "createdAt": 1573497643.374, "errors": [] } }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: