https://github.com/awslabs/eks-auto-mode-ebs-migration-tool

https://github.com/awslabs/eks-auto-mode-ebs-migration-tool

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.5%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: awslabs
  • License: apache-2.0
  • Language: Go
  • Default Branch: main
  • Size: 206 KB
Statistics
  • Stars: 11
  • Watchers: 18
  • Forks: 1
  • Open Issues: 0
  • Releases: 5
Created about 1 year ago · Last pushed 10 months ago
Metadata Files
Readme Contributing License Code of conduct Codeowners Notice

README.md

eks-auto-mode-ebs-migration-tool

The eks-auto-mode-ebs-migration-tool is used to migrate a Persistent Volume Claim from a standard EBS CSI StorageClass (ebs.csi.aws.com) to the EKS Auto EBS CSI StorageClass (ebs.csi.eks.amazonaws.com) or vice-versa.

The migration process requires deleting the existing PersistentVolumeClaim/PersistentVolume and re-creating them with the new StorageClass. You must validate this process in an identical non-production environment first.

If running in a cluster with mixed compute (Auto Mode & Non Auto Mode Nodes), ensure that you have appropriate an appropriate NodeSelector or required Node Affinity to cause Pods with Auto Mode migrated volumes to only schedule against Auto Mode nodes.

```bash % ./eks-auto-mode-ebs-migration-tool --help The eks-auto-mode-ebs-migration-tool is used to migrate a Persistent Volume Claim from a standard EBS CSI StorageClass (ebs.csi.aws.com) to the EKS Auto EBS CSI StorageClass (ebs.csi.eks.amazonaws.com) or vice versa. To do this, it must delete the PVC/PV that are currently in use and replace them with new copies updated to use the new StorageClass. Workloads using the volume must be scaled down or terminated before use, as the EBS Volume must be detached prior to migration.

Usage of ./eks-auto-mode-ebs-migration-tool: -attribution Show attribution -cluster-name string Name of the cluster -dry-run Run in dry-run mode where validations are performed, but no mutations occur (default true) -kubeconfig string Absolute path to the kubeconfig file (default "~/.kube/config") -namespace string Namespace for the PVC (default "default") -pvc-name string Name of the PVC -snapshot Create a snapshot of the EBS volume prior to making any changes (default true) -storageclass string New storage class to migrate to -yes Override the prompt to accept migration if all validations have passed ```

Pre-Requisites

The migration process validates and requires that:

  • The EBS Volume that backs the PersistentVolume must be unattached from any EC2 Instance. This means scaling down the StatefulSet or Deployment to allow the volume to detach.
  • The new StorageClass must have a volumeBindingMode of WaitForFirstConsumer to prevent the immediate creation of a PersistentVolume
  • The existing PersistentVolume must have a reclaim policy of Retain to ensure that the EBS Volume remains when the PersistentVolume is deleted
  • The caller needs appropriate Kubernetes permissions to Create/Delete the PersistentVolumeClaim and PersistentVolume.
  • The caller needs appropriate AWS IAM permissions to call DescribeVolume, and CreateTags on the EBS Volume as well as optionally CreateSnapshot,

Installation

Binaries are available on the releases page, or you can install via Homebrew

bash brew tap aws/tap brew install eks-auto-mode-ebs-migration-tool

Sample Usage

First, run the tool in dry-run mode (the default) to perform all validation checks:

bash % export AWS_REGION=us-west-2 % export AWS_PROFILE=myprofile % ./eks-auto-mode-ebs-migration-tool --cluster-name my-cluster-name --pvc-name my-pvc-name -storageclass new-storage-class 2025/03/31 10:06:36 running in dry-run mode 2025/03/31 10:06:38 Found PVC default/my-pvc-name 2025/03/31 10:06:38 Identified migration from StorageClass existing-storage-class-> new-storage-class 2025/03/31 10:06:40 Found EBS volume vol-12345678901234 2025/03/31 10:06:40 Dry-run completed successfully

If this is successful, you can add the --dry-run=false argument to the command line to perform the actual migration:

bash % export AWS_REGION=us-west-2 % export AWS_PROFILE=myprofile % ./eks-auto-mode-ebs-migration-tool --cluster-name my-cluster-name --pvc-name my-pvc-name -storageclass new-storage-class --dry-run=false 2025/03/31 10:07:48 running in mutate mode 2025/03/31 10:07:51 Found PVC default/my-pvc-name 2025/03/31 10:07:51 Identified migration from StorageClass existing-storage-class-> new-storage-class 2025/03/31 10:07:52 Found EBS volume vol-12345678901234 2025/03/31 10:07:52 Creating EBS volume snapshot, this can take a few minutes 2025/03/31 10:07:53 snapshot status = pending, waiting for completion 2025/03/31 10:08:03 snapshot status = pending, waiting for completion 2025/03/31 10:08:13 snapshot status = pending, waiting for completion 2025/03/31 10:08:23 snapshot status = pending, waiting for completion 2025/03/31 10:08:33 Created snapshot of vol-12345678901234, snap-12345678901234 Validations were successful. The following operations can fail and will require manual intervention to repair in that case. Type YES to continue with migration YES 2025/03/31 10:08:53 Existing PVC has been deleted 2025/03/31 10:08:54 Existing PV has been deleted 2025/03/31 10:08:54 Created new PVC my-pvc-name with UID ea5acb08-5a1a-4ffc-ad08-d6ddc24f271b 2025/03/31 10:08:54 Tagging EBS volume to match new PVC 2025/03/31 10:08:54 Created new persistent volume, pvc-ea5acb08-5a1a-4ffc-ad08-d6ddc24f271b 2025/03/31 10:08:54 Migration complete!

Security Information

When you build solutions on Amazon Web Services, security responsibilities are shared between you and Amazon Cloud. This Shared Responsibility Model reduces your operational burden due to the Amazon Web Services operations, management, and control components, including host operations The physical security of the system, the virtualization layer, and the facility where the service runs. For more information on Amazon Web Services, visit Amazon Web Services Cloud Security.

Owner

  • Name: Amazon Web Services - Labs
  • Login: awslabs
  • Kind: organization
  • Location: Seattle, WA

AWS Labs

GitHub Events

Total
  • Create event: 21
  • Release event: 2
  • Issues event: 3
  • Watch event: 8
  • Delete event: 18
  • Issue comment event: 8
  • Push event: 29
  • Public event: 1
  • Pull request event: 49
  • Pull request review event: 17
  • Fork event: 1
Last Year
  • Create event: 21
  • Release event: 2
  • Issues event: 3
  • Watch event: 8
  • Delete event: 18
  • Issue comment event: 8
  • Push event: 29
  • Public event: 1
  • Pull request event: 49
  • Pull request review event: 17
  • Fork event: 1

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 2
  • Total pull requests: 28
  • Average time to close issues: 4 days
  • Average time to close pull requests: about 6 hours
  • Total issue authors: 2
  • Total pull request authors: 2
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.11
  • Merged pull requests: 16
  • Bot issues: 0
  • Bot pull requests: 23
Past Year
  • Issues: 2
  • Pull requests: 28
  • Average time to close issues: 4 days
  • Average time to close pull requests: about 6 hours
  • Issue authors: 2
  • Pull request authors: 2
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.11
  • Merged pull requests: 16
  • Bot issues: 0
  • Bot pull requests: 23
Top Authors
Issue Authors
  • avnerv (1)
  • eilaytal (1)
Pull Request Authors
  • dependabot[bot] (23)
  • tzneal (5)
Top Labels
Issue Labels
Pull Request Labels
dependencies (23) go (23)

Dependencies

.github/workflows/release.yaml actions
  • actions/checkout v4.1.5 composite
  • actions/setup-go v5.0.1 composite
  • goreleaser/goreleaser-action v4 composite
.github/workflows/test.yaml actions
  • actions/checkout v4.1.5 composite
  • actions/setup-go v5.0.1 composite
go.mod go
  • github.com/aws/aws-sdk-go-v2 v1.36.3
  • github.com/aws/aws-sdk-go-v2/config v1.29.14
  • github.com/aws/aws-sdk-go-v2/credentials v1.17.67
  • github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30
  • github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34
  • github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34
  • github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3
  • github.com/aws/aws-sdk-go-v2/service/ec2 v1.213.0
  • github.com/aws/aws-sdk-go-v2/service/eks v1.64.0
  • github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3
  • github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15
  • github.com/aws/aws-sdk-go-v2/service/sso v1.25.3
  • github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1
  • github.com/aws/aws-sdk-go-v2/service/sts v1.33.19
  • github.com/aws/smithy-go v1.22.3
  • github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
  • github.com/emicklei/go-restful/v3 v3.11.0
  • github.com/fxamacker/cbor/v2 v2.7.0
  • github.com/go-logr/logr v1.4.2
  • github.com/go-openapi/jsonpointer v0.21.0
  • github.com/go-openapi/jsonreference v0.20.2
  • github.com/go-openapi/swag v0.23.0
  • github.com/gogo/protobuf v1.3.2
  • github.com/google/gnostic-models v0.6.9
  • github.com/google/go-cmp v0.7.0
  • github.com/google/uuid v1.6.0
  • github.com/josharian/intern v1.0.0
  • github.com/json-iterator/go v1.1.12
  • github.com/mailru/easyjson v0.7.7
  • github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
  • github.com/modern-go/reflect2 v1.0.2
  • github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822
  • github.com/onsi/ginkgo/v2 v2.22.0
  • github.com/onsi/gomega v1.36.1
  • github.com/pkg/errors v0.9.1
  • github.com/spf13/pflag v1.0.5
  • github.com/x448/float16 v0.8.4
  • golang.org/x/net v0.38.0
  • golang.org/x/oauth2 v0.27.0
  • golang.org/x/sys v0.31.0
  • golang.org/x/term v0.30.0
  • golang.org/x/text v0.23.0
  • golang.org/x/time v0.9.0
  • google.golang.org/protobuf v1.36.5
  • gopkg.in/evanphx/json-patch.v4 v4.12.0
  • gopkg.in/inf.v0 v0.9.1
  • gopkg.in/yaml.v3 v3.0.1
  • k8s.io/api v0.33.0
  • k8s.io/apimachinery v0.33.0
  • k8s.io/client-go v0.33.0
  • k8s.io/klog/v2 v2.130.1
  • k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff
  • k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738
  • sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3
  • sigs.k8s.io/randfill v1.0.0
  • sigs.k8s.io/structured-merge-diff/v4 v4.6.0
  • sigs.k8s.io/yaml v1.4.0
go.sum go
  • 117 dependencies