Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate-to-pod-identity fails with "Association already exists" #7753

Open
cPu1 opened this issue May 9, 2024 · 0 comments
Open

migrate-to-pod-identity fails with "Association already exists" #7753

cPu1 opened this issue May 9, 2024 · 0 comments

Comments

@cPu1
Copy link
Collaborator

cPu1 commented May 9, 2024

When running eksctl utils migrate-to-pod-identity --approve without the --remove-oidc-provider-trust-relationship flag, eksctl adds a new trust relationship for the pods.eks.amazonaws.com principal without removing the service account's role annotation, but a subsequent rerun causes it to fail with this error:

Error: creating pod identity association for service account "test" in namespace "kube-system": operation error EKS: CreatePodIdentityAssociation, https response error StatusCode: 409, RequestID: <redacted>, ResourceInUseException: Association already exists: <redacted>

Sample config:

---
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig

metadata:
  name: test
  region: us-west-2

iam:
  withOIDC: true
  serviceAccounts:
    - metadata:
        name: test
        namespace: kube-system
      wellKnownPolicies:
        awsLoadBalancerController: true

Steps to reproduce

  1. Create IAM service accounts
  2. Run eksctl utils migrate-to-pod-identity -f cluster.yaml --approve
  3. Run eksctl utils migrate-to-pod-identity -f cluster.yaml --approve again
@cPu1 cPu1 added the kind/bug label May 9, 2024
@cPu1 cPu1 self-assigned this May 9, 2024
@cPu1 cPu1 changed the title migrate-to-pod-identity fails after rerunning with --remove-oidc-provider-trust-relationship migrate-to-pod-identity fails with pod identity association already exists May 9, 2024
@cPu1 cPu1 changed the title migrate-to-pod-identity fails with pod identity association already exists migrate-to-pod-identity fails with "Association already exists" May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant