AWS-UpdateEKSManagedNodegroupVersion - AWS Systems Manager
AWS 文档中描述的 AWS 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 AWS 服务入门

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

AWS-UpdateEKSManagedNodegroupVersion

描述

This document updates managed node groups in your Amazon EKS cluster to the latest AMI version. For more information about this update process, see Updating a managed node group in the Amazon EKS 用户指南. We also recommend that you review the following topics before you run the AWS-UpdateEKSManagedNodegroupVersion document.

If your cluster uses autoscaling, scale the deployment down to zero replicas to avoid conflicting scaling actions.

To scale a deployment to zero replicas

  1. Install the Kubernetes command line utility, kubectl. For more information, see Installing kubectl in the Amazon EKS 用户指南.

  2. 运行以下命令。

    kubectl scale deployments/cluster-autoscaler --replicas=0 -n kube-system
  3. Run the AWS-UpdateEKSManagedNodegroupVersion document.

  4. Scale the deployment back to the desired number of replicas by running the following command.

    kubectl scale deployments/cluster-autoscaler --replicas=number -n kube-system

运行此 Automation(控制台)

文档类型

Automation

所有者

Amazon

平台

Linux、macOS、Windows

参数

  • AutomationAssumeRole

    类型:字符串

    说明:(可选)允许 Systems Manager Automation 代表您执行操作的 AWS Identity and Access Management (IAM) 角色的 Amazon 资源名称 (ARN)。如果未指定任何角色,则 Systems Manager Automation 使用运行此文档的用户的权限。

  • ClusterName

    类型: 字符串

    描述:(Required) The name of the Amazon EKS cluster.

  • NodeGroupName

    类型: 字符串

    描述:(Required) The name of the managed node group.

  • LaunchTemplateVersion

    类型: 字符串

    描述:(Optional) The Amazon Elastic Compute Cloud (Amazon EC2) launch template version. This parameter is only valid if a node group was created from a launch template.

  • ForceUpgrade

    类型: Boolean

    描述:(Optional) If true, the update won't fail in response to a pod disruption budget violation.

所需的 IAM 权限

AutomationAssumeRole 需要执行以下操作才能成功运行 Automation 文档。

  • eks:DescribeNodegroup

  • eks:UpdateNogegroupVersion

文档步骤

aws:executeScript - UpdateEKSManagedNodegroupVersion: Updates the AMI version used by a managed node group in an Amazon EKS cluster.