Using EBS volumes and ELB balancers requires that the cloud provider be configured as AWS for the cluster, and that the nodes of the cluster have IAM instance profiles that allow access to the APIs to manipulate them. The UI does not configure the cloud provider until next release, and you likely don’t have instance profiles setup.
It’s under Cluster Options in beta3 (today); IAM instance profile is in the node template (which you’ll have to recreate because youc an’t currently edit).
I created a brand new Rancher 2.0 Beta 3 cluster using Amazon EC2. The resulting cluster did not contain any Storage Volume Class definition. I think the cluster config script is not setting things up properly. Using the GKE or Azure Kubernetes Service work just fine. Storage class are created and Persistant Volumes are properly created.
Hope this help pinpoint the issue with the Amazon EC2 cluster build.
GKE and AKS are hosted kubernetes clusters. Once created they show whatever storage classes Google/Azure creates for you by default. EC2 is bare machines, there is nothing to decide what storage classes to create.
For them to work if you create your own, you need to create the cluster with the Amazon cloud provider chosen. Then the nodes need to have an IAM instance profile set that allows the related operations (creating EBS volumes, mounting them to instances, etc).
I’m having a similar issue. I have the appropriate IAM policies set for my Rancher Nodes, basically anything ec2:…Volume but persistent volumes are getting created.
Are they volumes that are created first in AWS and then connected to? Seems like Rancher is supposed to be provisioning them.
I have AWS set as the cloud provider and the creation of the clusters works just fine.
A persistent volume (PV) refers to a piece of storage that already exists. So creating one on its own does not make anything in AWS, the volume id has to refer to an existing volume in EBS.
To dynamically provision storage, you need a cluster configured with a cloud-provider that supports it (the AWS one does). Then you define one or more Storage Classes (some providers preconfigure one, but AWS doesn’t), and create a persistent volume claim (PVC) that requests X GB using Y storage class. The provisioner then creates the underlying storage resource and makes a PV pointing to it and binds the PVC to that PV.