Package: eksupgrade
Amazon EKS Upgrade UtilityAmazon EKS cluster upgrade is a utility that automates the upgrade process for Amazon EKS clusters.Checks post v0.9.0The pre/post-flight checks are removed in favor of guiding the user to evaluate their clusters with existing tools which handle this better such aseksup. The existing pre/post checks will be replaced with relevant checks specific to the upgrade (based on previous understanding the cluster is eligible for such an upgrade).Cluster UpgradeControl plane upgrade - This is handled entirely by AWS once the version upgrade has been requested.Identification of Managed and Self-managed node - The worker nodes are identified as EKS managed and Self-managed to perform upgrade.Managed Node group update - Updates managed node group to the specified version.Self-managed Node group updateLaunch new nodes with upgraded version and wait until they require ready status for next step.Mark existing nodes as unschedulable.If pod disruption budget (PDB) is present then check for force eviction flag (--force) which is given by user, only then evict the pods or continue with the flow.Pre-RequisitesBefore runningeksupgrade, you will need to have permission for both AWS and the Kubernetes cluster itself.Installeksupgradelocally:python-mpipinstalleksupgradeEnsure you have the necessary AWS permissions; an example policy of required permissions is listed below:{"Version":"2012-10-17","Statement":[{"Sid":"iam","Effect":"Allow","Action":["iam:GetRole","sts:GetAccessKeyInfo","sts:GetCallerIdentity","sts:GetSessionToken"],"Resource":"*"},{"Sid":"ec2","Effect":"Allow","Action":["autoscaling:CreateLaunchConfiguration","autoscaling:Describe*","autoscaling:SetDesiredCapacity","autoscaling:TerminateInstanceInAutoScalingGroup","autoscaling:UpdateAutoScalingGroup","ec2:Describe*","ssm:*"],"Resource":"*"},{"Sid":"eks","Effect":"Allow","Action":["eks:Describe*","eks:List*","eks:UpdateAddon","eks:UpdateClusterVersion","eks:UpdateNodegroupVersion"],"Resource":"*"}]}Update your local kubeconfig to authenticate to the cluster:awseksupdate-kubeconfig--name<CLUSTER-NAME>--region<REGION>UsageTo view the arguments and options, run:eksupgrade--helpUsage:eksupgrade[OPTIONS]CLUSTER_NAMECLUSTER_VERSIONREGIONRuneksupgradeagainstatargetcluster.

╭─Arguments──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│*cluster_nameTEXTThenameoftheclustertobeupgraded[default:None][required]│
│*cluster_versionTEXTThetargetKubernetesversiontoupgradetheclusterto[default:None][required]│
│*regionTEXTTheAWSregionwherethetargetclusterresides[default:None][required]│
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─Options────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│--max-retryINTEGERThemostnumberoftimestoretryanupgrade[default:2]│
│--force--no-forceForcetheupgrade(e.g.podevictionwithPDB)[default:no-force]│
│--preflight--no-preflightRunpre-upgradecheckswithoutupgrade[default:no-preflight]│
│--parallel--no-parallelUpgradeallnodegroupsinparallel[default:no-parallel]│
│--latest-addons--no-latest-addonsUpgradeaddonstothelatesteligibleversioninsteadofdefault[default:no-latest-addons]│
│--disable-checks--no-disable-checksDisablethepre-upgradeandpost-upgradechecksduringupgradescenarios[default:no-disable-checks]│
│--interactive--no-interactiveIfenabled,prompttheuserforconfirmations[default:interactive]│
│--versionDisplaythecurrenteksupgradeversion│
│--install-completionInstallcompletionforthecurrentshell.│
│--show-completionShowcompletionforthecurrentshell,tocopyitorcustomizetheinstallation.│
│--helpShowthismessageandexit.│
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯Support & FeedbackThis project is maintained by AWS Solution Architects and Consultants. It is not part of an AWS service and support is provided best-effort by the maintainers. To post feedback, submit feature ideas, or report bugs, please use theIssues sectionof this repo. If you are interested in contributing, please see theContribution guide.SecuritySeeCONTRIBUTINGfor more information.LicenseThis library is licensed under the MIT-0 License. See theLICENSEfile.