Guide to upgrade an EKS cluster from 1.30 to 1.31 using Terraform

Opcito Technologies
3 min readNov 25, 2024

--

It’s time to upgrade your EKS clusters! Following up on my previous blog about upgrading an EKS cluster from 1.29 to 1.30, this highly anticipated Kubernetes 1.31 release, nicknamed Elli, brings new features and improvements. If you’re worried about navigating the upgrade process alone, don’t worry. This blog will guide you through a smooth and efficient upgrade using Terraform, ensuring your workloads transition seamlessly into the Elli era.

What are the changes in Kubernetes 1.31 release?

You can find a complete list of changes and updates in Kubernetes version 1.31 here. These are the updates that caught my eye.

AppArmor support is now stable: Protect your containers using AppArmor by setting the appArmorProfile.type field in the container’s securityContext. Note that before Kubernetes v1.30, AppArmor was controlled via annotations; starting in v1.30 it is controlled using fields. It is recommended that you should migrate away from using annotations and start using the appArmorProfile.type field.

Improved ingress connectivity reliability for kube-proxy: Kube-proxy improved ingress connectivity reliability. One of the common problems with load balancers in Kubernetes is the synchronization between the different components involved to avoid traffic drop. This feature implements a mechanism in kube-proxy for load balancers to do connection draining for terminating Nodes exposed by services of type: LoadBalancer and externalTrafficPolicy: Cluster and establish some best practices for cloud providers and Kubernetes load balancers implementations.

Persistent Volume last phase transition time: This feature adds a PersistentVolumeStatus field which holds a timestamp of when a PersistentVolume last transitioned to a different phase. With this feature enabled, every PersistentVolume object will have a new field .status.lastTransitionTime, that holds a timestamp of when the volume last transitioned its phase. This change is not immediate; the new field will be populated whenever a PersistentVolume is updated and first transitions between phases (Pending, Bound, or Released) after upgrading to Kubernetes v1.31. This allows you to measure time between when a PersistentVolume moves from Pending to Bound. This can be also useful for providing metrics and SLOs.

This release includes a total of 11 enhancements promoted to Stable:

  • PersistentVolume last phase transition time
  • Metric cardinality enforcement
  • Kube-proxy improved ingress connectivity reliability
  • Add CDI devices to device plugin API
  • Move cgroup v1 support into maintenance mode
  • AppArmor support
  • PodHealthyPolicy for PodDisruptionBudget
  • Retriable and non-retriable Pod failures for Jobs
  • Elastic Indexed Jobs
  • Allow StatefulSet to control start replica ordinal numbering
  • Random Pod selection on ReplicaSet downscaling

Deprecation and Removal in versions in Kubernetes 1.30 release:

  • Deprecation of status.nodeInfo.kubeProxyVersion field for Nodes: The .status.nodeInfo.kubeProxyVersion field of Nodes has been deprecated in Kubernetes v1.31, and will be removed in a later release. It’s being deprecated because the value of this field wasn’t (and isn’t) accurate. This field is set by the kubelet, which does not have reliable information about the kube-proxy version or whether kube-proxy is running.
    The DisableNodeKubeProxyVersion feature gate will be set to true in by default in v1.31 and the kubelet will no longer attempt to set the .status.kubeProxyVersion field for its associated Node.
  • Removal of kubelet — keep-terminated-pod-volumes command line flag: The kubelet flag — keep-terminated-pod-volumes, which was deprecated in 2017, has been removed as part of the v1.31 release.

Steps to upgrade EKS from 1.30 to 1.31

First, I deployed EKS cluster in AWS Cloud with 1.30 version by Terraform. (read more..)

--

--

Opcito Technologies
Opcito Technologies

Written by Opcito Technologies

Product engineering experts specializing in DevOps, Containers, Cloud, Automation, Blockchain, Test Engineering, & Open Source Tech

No responses yet