首页 > 解决方案 > Kube-aws: Template format error: Unresolved resource dependencies [IAMRoleController]

问题描述

I'm using kube-aws v0.15.2 to setup a Kubernetes cluster in AWS. I have predefined IAM roles and instance profiles for controller, etcd and workers. I have another cluster that is using the same IAM roles and instance profiles which was created using kube-aws v0.9.x. With the newly generated cluster.yaml I generated certs and rendered stack. But while performing validate I'm getting the following error:

$ kube-aws validate
Validating UserData and stack template...
generating assets for control-plane, network, etcd, nodepoolA
Error: failed to validate control plane: invalid cloudformation stack template https://s3.amazonaws.com/.../mycluster/exported/stacks/control-plane/stack.json:
ValidationError: Template format error: Unresolved resource dependencies [IAMRoleController] in the Resources block of the template

In cluster.yaml, IAM block of controller would look like this:

 iam:
#    role:
#      name: "yourManagedRole"
#      # strictName: true
     manageExternally: true
#      managedPolicies:
#      - arn: "arn:aws:iam::aws:policy/AdministratorAccess"
#      - arn: "arn:aws:iam::YOURACCOUNTID:policy/YOURPOLICYNAME"
     instanceProfile:
       arn: "arn:aws:iam::xxxxxx:instance-profile/MyKubernetesIAMInstanceProfileController"

Addons like kube2iam, kiam etc are disabled.

Please let me know how to fix it.

Thanks in advance

标签: kubernetesamazon-cloudformationkube-aws

解决方案


看起来 kube-aws 也会针对 0.16.20.15.3进行修复。

在 github 中创建票证:https ://github.com/kubernetes-incubator/kube-aws/issues/1855


推荐阅读