<p>I'm having problems setting up AWS Integration on a Kubernetes Cluster. I've already set the <em>kubernetes.io/cluster/clustername = owned</em> tag on all Instances, Subnets, VPC, and in a Single SG. I've also passed the <em>--cloud-provider=aws</em> flag to both API Server and Controller Manager, but the Controller Manager does not start.</p>

<p>Controller Manager Logs:</p>

<pre><code>I0411 21:03:48.360194       1 aws.go:1026] Building AWS cloudprovider
I0411 21:03:48.360237       1 aws.go:988] Zone not specified in configuration file; querying AWS metadata service
F0411 21:03:48.363067       1 controllermanager.go:159] error building controller context: cloud provider could not be initialized: could not init cloud provider "aws": error finding instance i-0442e20b4a28b2274: "error listing AWS instances: \"NoCredentialProviders: no valid providers in chain. Deprecated.\\n\\tFor verbose messaging see aws.Config.CredentialsChainVerboseErrors\""
</code></pre>

<p>The Policy Attached to the Master Nodes is:</p>

<pre><code>{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [ "ec2:*" ],
      "Resource": [ "*" ]
    },
    {
      "Effect": "Allow",
      "Action": [ "elasticloadbalancing:*" ],
      "Resource": [ "*" ]
    },
    {
      "Effect": "Allow",
      "Action": [ "route53:*" ],
      "Resource": [ "*" ]
    }
  ]
}
</code></pre>

<p>Querying the AWS Metadata Service from a master via cURL returns proper credentials</p>

<p>Any help will be much appreciated!</p>

<p>P.S: I'm not using Kops or anything of that kind. I've set up the control components plane by myself.</p>

<p>I was able to fix this by passing the <strong>--cloud-provider=aws</strong> flag to the kubelets. I thought that wasn't needed on Master nodes.</p>

<p>Thanks!</p>
