azavea / noaa-hydro-data

NOAA Phase 2 Hydrological Data Processing
11 stars 3 forks source link

Add EBS CSI driver and upgrade Kubernetes version to 1.23 #92

Closed jpolchlo closed 2 years ago

jpolchlo commented 2 years ago

We received the email quoted below from AWS support regarding a change to EBS volume handling in future versions of Kubernetes. We should consider migrating to the newer version of k8s and making the recommended change.

Hello,

Amazon EKS now supports Kubernetes version 1.23. If you are running stateful workloads on your EKS cluster using Amazon EBS volumes, then you must install the EBS CSI driver before upgrading to EKS version 1.23 to avoid any interruption to your workloads.

Kubernetes clusters running on AWS support provisioning and mounting Amazon EBS volumes to pods. In EKS version 1.22 or earlier, there are two ways to perform this task. You can use the in-tree storage plugin (provisioner of type kubernetes.io/aws-ebs) or the Amazon EBS CSI driver (provisioner of type ebs.csi.aws.com) [1]. In-tree storage plugins are deprecated in Kubernetes. In line with this deprecation, EBS in-tree plugin will be deprecated in Amazon EKS clusters version 1.23 and later, and its functionality will be performed by the EBS CSI driver.

To make the transition from in-tree plugins to CSI drivers smoother, the Kubernetes project created the CSI migration feature [2]. This feature translates in-tree APIs to equivalent CSI APIs and delegates operations to a replacement CSI driver. With this feature, you shouldn’t notice a difference when provisioning and mounting Amazon EBS volumes to pods. Existing StorageClass, PersistentVolume, and PersistentVolumeClaim objects belonging to workloads continue to work. Behind the scenes, Kubernetes automatically delegates all storage management operations from in-tree plugins to CSI drivers. Amazon EKS has enabled the EBS CSI migration feature in EKS version 1.23. This means that management operations of storage objects that were previously backed by the in-tree plugin will be handled by the EBS CSI driver. The driver must be installed in your cluster for this seamless transition to work.

If you are using Amazon EBS volumes in your cluster, then you must install the EBS CSI driver before upgrading to Amazon EKS version 1.23 to avoid any interruption to your workloads. EKS offers EBS CSI driver as an EKS add-on to make it easier for you to adopt the driver. You can find details on EBS CSI Migration in the EKS documentation [3] and instructions for installing the EBS CSI driver in the available User Guide [4].

If you have any questions or concerns, please reach out to AWS Support [5].

[1] https://github.com/kubernetes-sigs/aws-ebs-csi-driver [2] https://kubernetes.io/blog/2021/12/10/storage-in-tree-to-csi-migration-status-update/ [3] https://docs.aws.amazon.com/eks/latest/userguide/ebs-csi-migration-faq.html [4] https://docs.aws.amazon.com/eks/latest/userguide/ebs-csi.html [5] https://aws.amazon.com/support

jpolchlo commented 2 years ago

This upgrade should be dry-runned by azavea/kubernetes#8 before we pull it over here. But, for the record, because of problems tracked in #85, we're not currently using mounted EBS volumes for this repo, and instead are storing notebooks on S3.

jpolchlo commented 2 years ago

We're going to rely on the resolution of this to be dealt with in azavea/kubernetes-deployment#8. It's not super important that this repository be on the latest Kubernetes version.