kubernetes / website

Kubernetes website and documentation repo:
https://kubernetes.io
Creative Commons Attribution 4.0 International
4.5k stars 14.44k forks source link

Kubernetes Documentation wrongly mentions gp3 support for in-tree provisioner kubernetes.io/aws-ebs #33036

Closed youwalther65 closed 2 years ago

youwalther65 commented 2 years ago

Documentation for AWS EBS StorageClass mentions: type: io1, gp2, gp3, sc1, st1. See AWS docs for details. Default: gp3.

But this is not supported by in-tree and does not work. Here an EKS v1.21 example: $ cat aws-ebs-in-tree-gp3-sc.yaml apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: gp3-in-tree parameters: fsType: ext4 type: gp3 provisioner: kubernetes.io/aws-ebs reclaimPolicy: Delete volumeBindingMode: WaitForFirstConsumer

$ k create -f aws-ebs-in-tree-gp3-sc.yaml storageclass.storage.k8s.io/gp3-in-tree created

$ k get sc gp3-in-tree NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE gp3-in-tree kubernetes.io/aws-ebs Delete WaitForFirstConsumer false 7s

$ cat pvc1-gp3.yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: name: gp3-pvc1 spec: storageClassName: gp3-in-tree accessModes:

$ k create -f pvc1-gp3.yaml persistentvolumeclaim/gp3-pvc1 created

$ k get pvc gp3-pvc1 NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE gp3-pvc1 Pending gp3-in-tree 13s

$ cat pvc1-gp3-pod.yaml apiVersion: v1 kind: Pod metadata: name: pvc1-pod spec: volumes:

$ k create -f pvc1-gp3-pod.yaml pod/pvc1-pod created

$ k get pvc gp3-pvc1 NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE gp3-pvc1 Pending gp3-in-tree 2m40s

$ k describe pvc gp3-pvc1 Name: gp3-pvc1 Namespace: default StorageClass: gp3-in-tree Status: Pending Volume: Labels: Annotations: volume.beta.kubernetes.io/storage-provisioner: kubernetes.io/aws-ebs volume.kubernetes.io/selected-node: ip-.eu-west-1.compute.internal Finalizers: [kubernetes.io/pvc-protection] Capacity: Access Modes: VolumeMode: Filesystem Used By: pvc1-pod Events: Type Reason Age From Message


Normal WaitForFirstConsumer 72s (x8 over 2m50s) persistentvolume-controller waiting for first consumer to be created before binding Warning ProvisioningFailed 12s (x7 over 68s) persistentvolume-controller Failed to provision volume with StorageClass "gp3-in-tree": invalid AWS VolumeType "gp3" Normal WaitForPodScheduled 12s (x10 over 68s) persistentvolume-controller waiting for pod pvc1-pod to be scheduled

sftim commented 2 years ago

/sig cloud-provider Thanks (and oops)

/kind bug /language en

youwalther65 commented 2 years ago

Thx for confirming. I am pretty sure it was correct a couple of month ago (and at that time never mentioned gp3 even if was already available)

sftim commented 2 years ago

/triage accepted

sftim commented 2 years ago

/priority backlog This is documented for in-tree storage, which is deprecated (but widely used).

youwalther65 commented 2 years ago

Exactly, in-tree provisioner “kubernetes.io/aws-ebs” does not support gp3, see legacy provider code: https://github.com/kubernetes/legacy-cloud-providers/blob/master/aws/aws.go#L448 // AWS volume types const (               // Provisioned IOPS SSD               VolumeTypeIO1 = "io1"               // General Purpose SSD               VolumeTypeGP2 = "gp2"               // Cold HDD (sc1)               VolumeTypeSC1 = "sc1"               // Throughput Optimized HDD               VolumeTypeST1 = "st1" )

I guess it would work somehow and I am already aware that some AWS customers modified AWS EBS volume type on AWS side to gp3 but letting K8s think it is still gp2 (according to StorageClass). Not sure if this could case problems.

youwalther65 commented 2 years ago

But even deprecated in-tree doc should be correct. My issue is just another reason to convince customer to move to EBS CSI. Can we please have this corrected ASAP?

sftim commented 2 years ago

Can we please have this corrected ASAP?

@youwalther65 you are very welcome to open a pull request with a fix - see https://kubernetes.io/docs/contribute/ for some advice.

If that's not something you have capacity for, you could ask the relevant vendor (AWS) if they would like to assign some staff time here. Beyond that, you're largely relying on the goodwill of people who volunteer their time.

youwalther65 commented 2 years ago

I just created the PR.

sftim commented 2 years ago

/close https://github.com/kubernetes/website/pull/33256 has merged

k8s-ci-robot commented 2 years ago

@sftim: Closing this issue.

In response to [this](https://github.com/kubernetes/website/issues/33036#issuecomment-1184607388): >/close >https://github.com/kubernetes/website/pull/33256 has merged Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.