How to set default EBS volumeType to GP3 for AWS cluster?
Problem
- How to set default EBS volumeType to GP3 for AWS cluster ?
Environment
- Platform9 Managed Kubernetes - v5.6.8 and Higher
- AWS cluster
Procedure
- Update the AWS Launch configuration for GP3 volume type:
- Call
edit
operation on the cluster:- Edit operation will update the AWS launch configuration from
gp2
volume type togp3
.(It will update the launch configuration with VolumeType=gp3, VolumeThroughput: 125 and VolumeIops: 3000)Users can use the PF9 UI or directly edit API:
- Edit operation will update the AWS launch configuration from
- Call
UI method: Infrastructure > Clusters > Legacy > [select your cluster] > edit > update cluster
2. API method: PUT /qbert/v4/<project_id >/clusters/<cluster_uuid>
For custom VolumeThroughput/VolumeIops customers can use the Edit API with the below payload:
PUT /qbert/v4/<project_id>/clusters/<cluster_uuid> Payload: { "ebsVolumeThroughput": 250, "ebsVolumeIops": 4000 }
We can use the aws cli to migrate the volumes:
- Configure the AWS cli with accessKey/SecretKey/region [Configure the AWS CLI - AWS Command Line Interface ]
- Get the volume information to migrate AWS Console > Instances > select the node > Storage > Block device > <get the volumeID>
Modify the volume: aws ec2 modify-volume --volume-type <
type of volume
> --iops <value
> --throughput <value
> --volume-id <volume_id
> modify-volume — AWS CLI 1.29.20 Command ReferenceExample:
Modify volume with default throughput/iops:
aws ec2 modify-volume --volume-type gp3 --volume-id vol-0ae4dff010dfdd799
Modify volume with custom throughput/iops:
aws ec2 modify-volume --volume-type gp3 --iops 3500 --throughput 130 --volume-id vol- 0ae4dff010dfdd799
- Check the status of the modification: Once the "ModificationState" is "completed", migration is completed.
aws ec2 describe-volumes-modifications --volume-id vol-0ae4dff010dfdd799