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]

asked 2 years ago1173 views
2 Answers
1
Accepted Answer

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
answered 2 years ago
  • 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
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions