EKS Cluster Create Failed

0

I am trying to create an eks cluster using the eksctl command. However, an error occurs as below:

AWS::EKS::Cluster/ControlPlane: CREATE_FAILED – "Resource handler returned message: "Duplicate key <<cluster_name>/ControlPlane"

If you try to delete it using cloudformation, it fails because of ControlPlane.

Currently, there is no EKS Cluster.

  • Check your ControlPlane tags in the CloudFormation Template. One is call "Name" and is created automatically. If you already put one that will fail.

  • AWS-User-4425126 6 days ago Check your ControlPlane tags in the CloudFormation Template. One is call "Name" and is created automatically. If you already put one that will fail.

    You're right Name is hard coding in cluster yaml file This problem is solved

    Thank you [AWS-User-4425126]

已提问 2 年前1205 查看次数
2 回答
1
已接受的回答

You can try to create a EKS cluster with other cluster name. I think it will work.

And back to the question, I believe you had the EKS same cluster name had created. If you can't delete it from cloudformation, Highly recommend to check the detail about the cloudformations log to get more info. Sometimes, you can't delete the cloudformation cause of you attached some IAM policy to IAM Role which created by eksctl.

ZenoRen
已回答 2 年前
  • Maby when deleting the cluster using cloudformation, it seems to have been deleted by retained Control Plane resource. So cloudformation stack deleted.

    I retry different cluster name, but same error returned. However, it is created EKS Cluster with AWS Console Management.

    As your guess, this seems to be caused by modifying the IAM role. Currently, I posted an article in Feedback on the Cloudformation page.

    Thanks for posting the answer.

1

I have a problem too, But I can solve this issue.

In my example, to install EKS I use eksctl and configure file. like this.

apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig

metadata:
  name: cluster-name
  region: ap-southeast-1
  version: "1.21"
  tags:
    Createby: xxxxx
    Environment: env-name
    Name: cluster-name
    Owner: owner-name
    Service: service-name
    System: system-name

in my configuration in the metadata section, There is a tag name that in earlier versions of eksctl has no problem, but in eksctl v0.82.0 there is a problem. When I checked in cloudformation template, I found a duplicate Tag Name like this.

        "Tags": [
          {
            "Key": "Environment",
            "Value": "env-name"
          },
          {
            "Key": "Owner",
            "Value": "owner-name"
          },
          {
            "Key": "Service",
            "Value": "service-name"
          },
          {
            "Key": "System",
            "Value": "system-name"
          },
          {
            "Key": "Createby",
            "Value": "xxxxx"
          },
          {
            "Key": "Name",
            "Value": "cluster-name"
          },
          {
            "Key": "Name",
            "Value": {
              "Fn::Sub": "${AWS::StackName}/ControlPlane"
            }
          }
        ],

When I tried to remove the tag name from config files and try again, it's work fine.

apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig

metadata:
  name: cluster-name
  region: ap-southeast-1
  version: "1.21"
  tags:
    Createby: xxxxx
    Environment: env-name
    Owner: owner-name
    Service: service-name
    System: system-name
zendz
已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则