GeekFactory

int128.hatenablog.com

EBS volume type standard not working on Kubernetes

The EBS volume type standard seems not working as a storage class on Kubernetes.

Reproduce the issue

Adding the following storage class:

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: standard
  labels:
    k8s-addon: storage-aws.addons.k8s.io
provisioner: kubernetes.io/aws-ebs
parameters:
  type: standard
reclaimPolicy: Delete

by the following commands:

kubectl apply -f config/storage-class-standard.yaml
kubectl patch storageclass gp2 -p '{"metadata": {"annotations":{"storageclass.beta.kubernetes.io/is-default-class":null}}}'
kubectl patch storageclass standard -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'

kube-controller-manager said:

I0220 01:40:56.305272       5 aws.go:1246] Found instances in zones map[us-west-2a:{}]
I0220 01:40:56.305382       5 util.go:314] Creating volume for PVC "jira-atlassian-jira-software"; chose zone="us-west-2a" from zones=["us-west-2a"]
I0220 01:40:56.305424       5 aws_util.go:137] Error creating EBS Disk volume: invalid AWS VolumeType "standard"
E0220 01:40:56.305452       5 aws_ebs.go:438] Provision failed: invalid AWS VolumeType "standard"
I0220 01:40:56.305517       5 pv_controller.go:1317] failed to provision volume for claim "devops/jira-atlassian-jira-software" with StorageClass "standard": invalid AWS VolumeType "standard"

See also