AWS Builder Center

AWS EKS version upgrade to 1.33 and AL2023 AMI

Upgrade AWS EKS Cluster from version 1.32 to 1.33 using Terraform and upgrade Amazon Linux 2 (AL2) to Amazon Linux 2023 (AL2023) along with Karpenter.

Series: AWS EKS Version Upgrade (7 articles)

  1. …
  2. 4
    AWS EKS version upgrade to 1.33 and AL2023 AMI This article
We will go through the changes required in Terraform script to in-place upgrade an AWS EKS Kubernetes cluster from 1.32 to 1.33 and upgrading Amazon Linux 2 (AL2) to Amazon Linux 2023 (AL2023. In addition, we will walk through the changes for Karpenter. We have used Karpenter for Node Scaling. We are effectively managing karpenter using AWS EKS Blueprint addon.
IAC Changes done
  • PRE-Validate the EKS current version.
1
aws eks describe-cluster --name sample --query cluster.version --output text
  • PRE-Validate EKS nodes.
1
kubectl get nodes
1
2
3
aws ssm get-parameter --name /aws/service/eks/optimized-ami/<kubernetes-version>/<ami-typ>/recommended/image_id --region <region-code> --query "Parameter.Value" --output text
sample:
aws ssm get-parameter --name /aws/service/eks/optimized-ami/1.33/amazon-linux-2023/x86_64/standard/recommended/image_id --region us-west-2 --query "Parameter.Value" --output text
  • Update the EKS version.
1
2
3
4
resource "aws_eks_cluster" "example" {
name = "sample"
version = "1.33"
}
1
2
3
4
5
6
7
8
9
---
apiVersion: node.eks.aws/v1alpha1
kind: NodeConfig
spec:
cluster:
name: my-cluster
apiServerEndpoint: https://example.com
certificateAuthority: Y2VydGlmaWNhdGVBdXRob3JpdHk=
cidr: 10.100.0.0/16
  • Update addon_version for each aws_eks_addon resource we want to update like vpc_cni , kube_proxy, coredns , etc.
  • Kube proxy addon was upgraded to version "v1.33.3-eksbuild.4".
  • karpenter changes: AMI Family was updated to AL2023 from AL2. No other changes in specification files required.
How was deployment done?
  1. AWS EKS Cluster changes were updated using Terraform and GitHub Actions. This automatically updated the master node.
  2. Next Karpenter changes were updated using Terraform and GitHub Actions. This automatically updates the worker nodes in rolling update strategy.

Series: AWS EKS Version Upgrade (7 articles)

  1. …
  2. 4
    AWS EKS version upgrade to 1.33 and AL2023 AMI This article
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article