Hyperkube apiserver zone not specified in configuration file

8/17/2017

So I'm getting this error when trying to install kubernetes with aws as the cloud provider. I'm installing with kubespray but I narrowed it down to the below command which I tried executing manually inside the hyperkube container. I'm guessing the actual error comes from not having the proper iam role. I'm working on obtaining one but that will take sometime. I also see that it says zone not specified in the configuration file. I'm not really sure where to specify it. Can someone point me in the right direction in that? Also just for testing purposes I can manually obtain awa access keys and session tokens. Is there a way to get hyperkube to use those?

root@15713968201f:/# /hyperkube apiserver --advertise-address=10.205.232.161 --etcd-servers=https://10.205.232.161:2379,https://10.205.235.70:2379 --etcd-quorum-read=true --etcd-cafile=/etc/ssl/etcd/ssl/ca.pem --etcd-certfile=/etc/ssl/etcd/ssl/node-ip-10-205-232-161.ec2.internal.pem --etcd-keyfile=/etc/ssl/etcd/ssl/node-ip-10-205-232-161.ec2.internal-key.pem --insecure-bind-address=127.0.0.1 --apiserver-count=2 --admission-control=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,ResourceQuota --service-cluster-ip-range=10.233.0.0/18 --service-node-port-range=30000-32767 --client-ca-file=/etc/kubernetes/ssl/ca.pem --basic-auth-file=/etc/kubernetes/users/known_users.csv --tls-cert-file=/etc/kubernetes/ssl/apiserver.pem --tls-private-key-file=/etc/kubernetes/ssl/apiserver-key.pem --token-auth-file=/etc/kubernetes/tokens/known_tokens.csv --service-account-key-file=/etc/kubernetes/ssl/apiserver-key.pem --secure-port=6443 --insecure-port=8080 --storage-backend=etcd3 --v=2 --allow-privileged=true --cloud-provider=aws --anonymous-auth=False I0817 22:08:00.258693 134 aws.go:762] Building AWS cloudprovider I0817 22:08:00.258810 134 aws.go:725] Zone not specified in configuration file; querying AWS metadata service Error: error setting the external host value: "aws" cloud provider could not be initialized: could not init cloud provider "aws": error finding instance i-045f83bfff733a224: error listing AWS instances: NoCredentialProviders: no valid providers in chain. Deprecated. For verbose messaging see aws.Config.CredentialsChainVerboseErrors Error: error setting the external host value: "aws" cloud provider could not be initialized: could not init cloud provider "aws": error finding instance i-045f83bfff733a224: error listing AWS instances: NoCredentialProviders: no valid providers in chain. Deprecated. For verbose messaging see aws.Config.CredentialsChainVerboseErrors

-- mdornfe1
amazon-web-services
kubernetes

1 Answer

8/18/2017

https://github.com/kubernetes/kubernetes/issues/11543

I'd be willing to bet that your node iam role doesn't have enough access. I'm not acquainted with kubespray but I think the above issue should help you troubleshoot your problem.

This is the bit that I'm focusing on:

error finding instance i-045f83bfff733a224: error listing AWS instances: NoCredentialProviders: no valid providers in chain.
-- Brett Wagner
Source: StackOverflow