Comments (16)
@aymanosman if you have multiple aws credentials in your ~/.aws/credentials
, how is the aws client supposed to know which one to use if you don't explicitly specify a default?
The "more direct" way is to just export AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY etc environment variables, rather than deal with the credentials chain.
from coreos-kubernetes.
@colhom, The AWS SDK for Go only supports the AWS_PROFILE
environment variable for profile names. AWS_DEFAULT_PROFILE
is a value only supported by the AWS CLI, not the SDKs. To add it would be a potentially breaking change to SDK users. We have issue aws/aws-sdk-go#384 which discusses this topic.
If you set env AWS_PROFILE
to your desired profile the SDK should respond to that.
from coreos-kubernetes.
@rclayton-the-terrible are you still seeing this issue?
from coreos-kubernetes.
@aaronlevy Honestly, I've stop trying. The closest I got to a full Kubernetes deployment on AWS was mirroring Kelsey's Terraform scripts. Since then, I've gotten really busy in development and haven't put any effort into it.
from coreos-kubernetes.
@rclayton-the-terrible if you get some time to come back to this, and you're still having issues, please let us know. I'm gonna close this for now, but feel free to re-open.
Also, just as a note, a quick way to get started deploying a cluster to AWS should be using the defaults in our quickstart guide: https://coreos.com/kubernetes/docs/latest/kubernetes-on-aws.html#kube-aws-quickstart
from coreos-kubernetes.
It might be related to: aws/aws-sdk-go#345
from coreos-kubernetes.
@rclayton-the-terrible Saw this was linked to the SDK. It looks like coreos-kubernetes is using a fairly old version of the SDK (0.9.5) But I've verified that this version of the SDK should be returning the configured role credential.
You can run the following curl commands on the EC2 host to see what error the SDK is running into.
# Get the role name
curl http://169.254.169.254//latest/meta-data/iam/security-credentials/
# Use role name to get credentials
curl http://169.254.169.254//latest/meta-data/iam/security-credentials/<my-ec2-iam-role-name>
The AWS SDK for Go has aws/aws-sdk-go#413 to improve this error message.
from coreos-kubernetes.
I ran into this issue yesterday. Using the latest version of kube-aws and my credential file is set up correctly.
from coreos-kubernetes.
+1 having this issue as well. Anything we can do to help debug?
EDIT: Doh! This was my fault for trying to do this from home. This message appeared when I had invalid (or in my case totally missing) AWS credentials. Make sure you can run something like aws ec2 describe-instances
to ensure your AWS credentials are valid.
from coreos-kubernetes.
I also experienced the error.
Initialized TLS infrastructure
Wrote kubeconfig to ...
Waiting for cluster creation...
Failed creating cluster: NoCredentialProviders: no valid providers in chain
I was using export AWS_DEFAULT_PROFILE=foo
Fixed the issue by making sure that a [default]
profile was set in ~/.aws/credentials
, but it still remains confusing to me why I was getting an error.
from coreos-kubernetes.
/cc @colhom
from coreos-kubernetes.
@colhom I was under the (presumably false) impression that export AWS_DEFAULT_PROFILE=foo
would do the trick. It is one way the awscli
determines which profile to use and I expected kube-aws
to also respect that.
http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html.
I have no idea how much work it is to support multiple profiles in this way. It's not a major issue.
from coreos-kubernetes.
The docs for the go sdk (https://github.com/aws/aws-sdk-go) seams to make no mention of AWS_DEFAULT_PROFILE which suggests that is isn't supported. So it is not an issue with this repo.
EDIT: In fact, support has been ruled out :) aws/aws-sdk-go#554.
EDIT2: Omg, apparently you can use AWS_PROFILE
instead of AWS_DEFAULT_PROFILE
do achieve the same effect with the sdk... I have tested this and it works. https://github.com/aws/aws-sdk-go/blob/c59d0ced7590a7e8df83b5871eb6dfbb13940af2/aws/credentials/shared_credentials_provider.go#L37
from coreos-kubernetes.
I'm also getting the issue. I followed instructions mentioned in https://coreos.com/kubernetes/docs/latest/kubernetes-on-aws.html. I tried v0.4.1, 0.4.0 but no luck.
from coreos-kubernetes.
Ref: #303
from coreos-kubernetes.
@DImuthuUpe This error means the aws sdk isn't picking up your credentials correctly. The docs have been updated with instructions for how to configure them.
I'm going to consider this fixed by the documentation update, but we'll enable verbose credential errors as well: #368.
Feel free to reopen if there's any more trouble.
edit: I don't actually have issue closing. @colhom can you close this and #303?
from coreos-kubernetes.
Related Issues (20)
- multi-node/generic/: Unexpected error configuring flannel pod network on VPS
- Multi-node: GuaranteedUpdate of /registry/minions/<NODE> failed because of a conflict
- configuration option for kubelet
- vagrant up fails with "sed: can't read /usr/lib/systemd/system/docker.service: No such file or directory" HOT 1
- Output: mount: unknown filesystem type 'glusterfs'
- Why I use calico in kubernetes, but still kubelet try to look for flannel?
- CoreOS hyperkube v1.9.0_coreos.0: No ipset utility, IPVS proxy mode fails HOT 17
- No hyperkube for v1.7.12? HOT 3
- Container Linux, kubernetes and CRI-O HOT 1
- Conformance tests use github.com/jteeuwen/go-bindata
- /usr/bin/kubelet: No such file or directory on 1662
- Calico Pod CrashLoopBackOff on Worker Nodes
- hyperkube 1.8.8 image? HOT 2
- kubeadm cluster-ip unreachable HOT 1
- Kubelet-Wrapper does not see mounts below hostmount HOT 1
- r
- hyperkube new 1.10.11 version ?
- 2079.3.0 did have changes -- all network device names were renamed
- vagrant example cluster are failing to deploy
- kubelet-wrapper fails to start kubelet on k8s 1.17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coreos-kubernetes.