AWS - EKS Cluster Upgrade#
EKS Cluster Upgrade procedure#
EKS clusters can be upgraded using trackbone directly without using the WebUI or the CLIs provided by AWS.
EKS clusters upgrades are performed in two steps starting with the upgrade of the control plane and followed by the upgrade of the node groups. The control plane upgrade is transparent. The node group upgrade will cause certain applications to become unavailable depending on how many replicas they have.
It is important to note that we have to upgrade cluster incrementally, meaning we have to go from version 1.18 to version 1.19 to get to version 1.20 for example. We cannot go from version 1.18 directly to version 1.20. This is valid for both the control plane upgrade as well as the node group version upgrade.
Step 1: Upgrading the Control Plane#
In order to upgrade the control plane for an environment we need to set the cluster version variable to the desired k8s version
envs: ["delta"]: configurations: eks: tfvars: {
cluster_version: "1.19"
}
trackbone apply will trigger the upgrade. A control plane upgrade takes about 45 min to 1 hour to complete.
Step 2: Upgrading the Node Group Version#
The node groups need to be upgraded to the same version as the EKS cluster. This is done by setting the eks_node_group_version variable in trackbone.
envs: ["delta"]: configurations: eks: tfvars: {
cluster_version: "1.19"
eks_node_group_version: "1.19"
}
trackbone apply to trigger an upgrade of the node groups. During the upgrade, AWS will add nodes to the node group, drain legacy nodes and remove the legacy nodes.
The operation will take about 1h to complete.