Kubernetes with AWS Elastic Block Storage Unit

We are trying to configure Kubernetes RC in an AWS instance with the AWS Elastic Block Store (EBS). here is the key part of our controller yaml file -

volumeMounts: - mountPath: "/opt/phabricator/repo" name: ebsvol volumes: - name: ebsvol awsElasticBlockStore: volumeID: aws://us-west-2a/vol-***** fsType: ext4 

our rc can run the pod and it works fine, not installing it on AWS EBS, but with installing the volume in AWS EBS, which it gives us -

 Fri, 11 Sep 2015 11:29:14 +0000 Fri, 11 Sep 2015 11:29:34 +0000 3 {kubelet 172.31.24.103} failedMount Unable to mount volumes for pod "phabricator-controller-zvg7z_default": error listing AWS instances: NoCredentialProviders: no valid providers in chain Fri, 11 Sep 2015 11:29:14 +0000 Fri, 11 Sep 2015 11:29:34 +0000 3 {kubelet 172.31.24.103} failedSync Error syncing pod, skipping: error listing AWS instances: NoCredentialProviders: no valid providers in chain 

We have a credential file with the corresponding credentials in the .aws directory. But that does not work. Are we missing something? Is this a configuration problem?

Kubectl version: 1.0.4 and 1.0.5 (tried with both)

+5
source share
1 answer

We opened the problem to discuss this: https://github.com/kubernetes/kubernetes/issues/13858

The recommended use case here is to use IAM instance profiles. kube-up sets this up for you, and if you are not using kube-up, I recommend looking at it to emulate what it does!

Although we have recently teamed up to support the use of the .aws credential file, I do not believe that it has been ported to any release, and that is not how I (personally) recommend.

It looks like you are not using kube-up; it may be easier for you if you can use it (and I would be interested to know if there is some reason why you cannot or do not want to use kube-up, since I personally work on an alternative that I hope , everyone needs to meet!)

I would also be interested to know if IAM instance profiles are not right for you.

+4
source

All Articles