eksctl icon indicating copy to clipboard operation
eksctl copied to clipboard

[Bug] eksctl failed to create fargate profile in YUL when --fargate is included

Open wangamel opened this issue 3 years ago • 2 comments

What were you trying to accomplish?

Create EKS cluster with Fargate Profile in YUL

What happened?

eksctl failed while creating fargate profile in YUL

How to reproduce it?

Simply run below command

eksctl create cluster --fargate --region ca-central-1 --name <cluster_name> --version <cluster_version>

Logs

$ eksctl create cluster --fargate --region ca-central-1 --name cloud-provider-rbn-123-1 --version 1.23
2022-09-06 01:06:20 [ℹ]  eksctl version 0.109.0
2022-09-06 01:06:20 [ℹ]  using region ca-central-1
2022-09-06 01:06:21 [ℹ]  setting availability zones to [ca-central-1b ca-central-1a ca-central-1d]
2022-09-06 01:06:21 [ℹ]  subnets for ca-central-1b - public:192.168.0.0/19 private:192.168.96.0/19
2022-09-06 01:06:21 [ℹ]  subnets for ca-central-1a - public:192.168.32.0/19 private:192.168.128.0/19
2022-09-06 01:06:21 [ℹ]  subnets for ca-central-1d - public:192.168.64.0/19 private:192.168.160.0/19
2022-09-06 01:06:21 [ℹ]  using Kubernetes version 1.23
2022-09-06 01:06:21 [ℹ]  creating EKS cluster "cloud-provider-rbn-123-1" in "ca-central-1" region with Fargate profile
2022-09-06 01:06:21 [ℹ]  if you encounter any issues, check CloudFormation console or try 'eksctl utils describe-stacks --region=ca-central-1 --cluster=cloud-provider-rbn-123-1'
2022-09-06 01:06:21 [ℹ]  Kubernetes API endpoint access will use default of {publicAccess=true, privateAccess=false} for cluster "cloud-provider-rbn-123-1" in "ca-central-1"
2022-09-06 01:06:21 [ℹ]  CloudWatch logging will not be enabled for cluster "cloud-provider-rbn-123-1" in "ca-central-1"
2022-09-06 01:06:21 [ℹ]  you can enable it with 'eksctl utils update-cluster-logging --enable-types={SPECIFY-YOUR-LOG-TYPES-HERE (e.g. all)} --region=ca-central-1 --cluster=cloud-provider-rbn-123-1'
2022-09-06 01:06:21 [ℹ]  
2 sequential tasks: { create cluster control plane "cloud-provider-rbn-123-1", 
    2 sequential sub-tasks: { 
        wait for control plane to become ready,
        create fargate profiles,
    } 
}
2022-09-06 01:06:21 [ℹ]  building cluster stack "eksctl-cloud-provider-rbn-123-1-cluster"
2022-09-06 01:06:23 [ℹ]  deploying stack "eksctl-cloud-provider-rbn-123-1-cluster"
2022-09-06 01:06:53 [ℹ]  waiting for CloudFormation stack "eksctl-cloud-provider-rbn-123-1-cluster"
2022-09-06 01:07:25 [ℹ]  waiting for CloudFormation stack "eksctl-cloud-provider-rbn-123-1-cluster"
2022-09-06 01:08:26 [ℹ]  waiting for CloudFormation stack "eksctl-cloud-provider-rbn-123-1-cluster"
2022-09-06 01:09:28 [ℹ]  waiting for CloudFormation stack "eksctl-cloud-provider-rbn-123-1-cluster"
2022-09-06 01:10:29 [ℹ]  waiting for CloudFormation stack "eksctl-cloud-provider-rbn-123-1-cluster"
2022-09-06 01:11:30 [ℹ]  waiting for CloudFormation stack "eksctl-cloud-provider-rbn-123-1-cluster"
2022-09-06 01:12:32 [ℹ]  waiting for CloudFormation stack "eksctl-cloud-provider-rbn-123-1-cluster"
2022-09-06 01:13:33 [ℹ]  waiting for CloudFormation stack "eksctl-cloud-provider-rbn-123-1-cluster"
2022-09-06 01:14:35 [ℹ]  waiting for CloudFormation stack "eksctl-cloud-provider-rbn-123-1-cluster"
2022-09-06 01:15:36 [ℹ]  waiting for CloudFormation stack "eksctl-cloud-provider-rbn-123-1-cluster"
2022-09-06 01:16:38 [ℹ]  waiting for CloudFormation stack "eksctl-cloud-provider-rbn-123-1-cluster"
2022-09-06 01:17:39 [ℹ]  waiting for CloudFormation stack "eksctl-cloud-provider-rbn-123-1-cluster"
2022-09-06 01:19:46 [ℹ]  creating Fargate profile "fp-default" on EKS cluster "cloud-provider-rbn-123-1"
2022-09-06 01:19:48 [!]  1 error(s) occurred and cluster hasn't been created properly, you may wish to check CloudFormation console
2022-09-06 01:19:48 [ℹ]  to cleanup resources, run 'eksctl delete cluster --region=ca-central-1 --name=cloud-provider-rbn-123-1'
2022-09-06 01:19:48 [✖]  failed to create Fargate profile "fp-default" on EKS cluster "cloud-provider-rbn-123-1": failed to create Fargate profile "fp-default": operation error EKS: CreateFargateProfile, https response error StatusCode: 400, RequestID: 0374cffa-f145-4405-a449-034273f8159b, InvalidParameterException: Fargate Profile creation for the Availability Zone ca-central-1d for Subnet subnet-0b533adf0b301cdde is not supported

Anything else we need to know? EKS Fargate currently does not support ca-central-1d AZ, but eksctl tried to use this AZ during profile creation. EKS Fargate blocks profile creation with ca-central-1d AZ, so it failed eksctl command with --fargate in YUL.

Versions

$ eksctl info
eksctl version: 0.109.0
kubectl version: v1.24.4
OS: darwin

wangamel avatar Sep 06 '22 08:09 wangamel

Hello wangamel :wave: Thank you for opening an issue in eksctl project. The team will review the issue and aim to respond within 1-3 business days. Meanwhile, please read about the Contribution and Code of Conduct guidelines here. You can find out more information about eksctl on our website

github-actions[bot] avatar Sep 06 '22 08:09 github-actions[bot]

Thanks for reporting this, we'll investigate soon. If you have a solution in mind we are happy to accept PRs. 👍🏻

Himangini avatar Sep 06 '22 16:09 Himangini

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Oct 13 '22 02:10 github-actions[bot]

eksctl does not attempt to ascertain if an AZ is supported in Fargate during cluster creation. But I do agree that the error message can be improved to guide the user in working around the issue.

A PR has been opened for this, we'll get it out in the next release.

cPu1 avatar Nov 07 '22 11:11 cPu1