question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

load balancer controller: serviceaccounts "aws-load-balancer-controller" already exists

See original GitHub issue

Describe the bug

Received response status [FAILED] from custom resource. Message returned: Error: ‘Error from server (AlreadyExists): error when creating “/tmp/manifest.yaml”: serviceaccounts “aws-load-balancer-controller” already exists’

These are the logs.

Running command: ['aws', 'eks', 'update-kubeconfig', '--role-arn', 'arn:aws:iam::xxxxxxxxxxx:role/dev-dev-blueprint-devblueprintCreationRole4B7B7FBC-1322RLGXKWTQF', '--name', 'dev-capstone', '--kubeconfig', '/tmp/kubeconfig']
--
Added new context arn:aws:eks:us-west-2:xxxxxxxxxxx:cluster/dev-capstone to /tmp/kubeconfig
[INFO]	2022-07-01T07:46:56.341Z	b05e6045-8815-45c7-ab77-0d3ebcd889f8	manifest written to: /tmp/manifest.yaml
[INFO]	2022-07-01T07:46:56.341Z	b05e6045-8815-45c7-ab77-0d3ebcd889f8	Running command: ['kubectl', 'create', '--kubeconfig', '/tmp/kubeconfig', '-f', '/tmp/manifest.yaml', '--save-config']
[ERROR] Exception: b'Error from server (AlreadyExists): error when creating "/tmp/manifest.yaml": serviceaccounts "aws-load-balancer-controller" already exists\n'Traceback (most recent call last):  File "/var/task/index.py", line 14, in handler    return apply_handler(event, context)  File "/var/task/apply/__init__.py", line 64, in apply_handler    kubectl('create', manifest_file, *kubectl_opts)  File "/var/task/apply/__init__.py", line 91, in kubectl    raise Exception(output)

Expected Behavior

Not sure, it should just override existing service account or something but not fail.

Current Behavior

It fails, if I delete the service account manually and then deploy. Then it works.

Reproduction Steps

It doesn’t happen the first time your create the cluster since there is no service account. But anytime it has to update the service account it fails.

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.29.1

EKS Blueprints Version

1.0.4

Node.js Version

16.14

Environment details (OS name and version, etc.)

macOS

Other information

No response

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:3
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tusharf5commented, Jul 6, 2022

I’ll try to install it again and see if it works.

0reactions
elamaran11commented, Jul 6, 2022

Would you be able to share us detailed step by step procedure you are following to get to this error. We recommend to start with one of our sample patterns such as generic-cluster-construct and multi-team-construct and try to update the AwsLoadBalancerControllerAddOn addon and let us know when you are facing this issue so that we can try to recreate. Most important part is having able to recreate the issue. We can fix the issue once we recreate it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[DUPLICATE] Cannot create a service account creation AWS ...
I am trying to install AWS Load Balancer Controller into a newly created ... of serviceaccounts that exist in Kubernetes will be updated, ......
Read more >
Installing the AWS Load Balancer Controller add-on
Create a Kubernetes service account named aws-load-balancer-controller in the kube-system namespace for the AWS Load Balancer Controller and annotate the ...
Read more >
Installation Guide - AWS Load Balancer Controller
AWS ALB Ingress controller must be uninstalled before installing AWS Load Balancer controller. Please follow our migration guide to do migration. Security ...
Read more >
IAM Roles for Service Accounts - eksctl
... or Kubernetes components like AWS Load Balancer controller or ExternalDNS. You can easily create IAM Role and Service Account pairs with eksctl...
Read more >
How to use the AWS Load Balancer Controller to connect ...
In this post we explore using the AWS Load Balancer Controller to dynamically bind nodes to existing Application Load Balancers.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found