How to Perform Seamless EKS Cluster Upgrade?
How to Perform Seamless EKS Cluster Upgrade?
Kubernetes is a fast-evolving project, releasing a new version approximately every 4 months. Since Amazon EKS stops supporting old versions (EOL), you must update your cluster regularly. The upgrade process can cause downtime if not planned correctly.
Upgrade Steps
1. Preparation and Check
- Release Notes: Definitely read what changed in the new version (e.g., v1.30), which APIs are deprecated.
- Kubent: Use the
kubent(Kube No Trouble) tool to detect services in your cluster using APIs that will be removed. - Add-ons: Check if VPC CNI, CoreDNS, and Kube-proxy versions are compatible with the new Kubernetes version.
2. Control Plane Upgrade
Upgrade the EKS version via AWS Console or Terraform. During this process, AWS opens new API servers in the background and closes old ones. Control plane access is not interrupted.
3. Data Plane (Node) Upgrade
After the control plane is updated, you must update worker nodes.
- Managed Node Groups: Say "Update" from the console. AWS performs a rolling update.
- Karpenter: Automatically refreshes nodes (drift detection).
4. Add-on Updates
Finally, update add-ons like VPC CNI, CoreDNS, Kube-proxy, and AWS Load Balancer Controller. Don't forget to update your kubectl version too.
Tip: Blue/Green Cluster
For very critical systems (e.g., banking), instead of updating the existing cluster, setting up a new cluster in the new version and gradually shifting traffic to the new cluster at the DNS level (Blue/Green Cluster Upgrade) is the safest method.