Skip to content

Instantly share code, notes, and snippets.

@markusl
Created April 1, 2025 17:48
Show Gist options
  • Save markusl/6b981bea6c770f3a1f51f50fae94e441 to your computer and use it in GitHub Desktop.
Save markusl/6b981bea6c770f3a1f51f50fae94e441 to your computer and use it in GitHub Desktop.
How to force AWS Load Balancer Controller in EKS to re-create ALBs that were manually deleted?

When the AWS Load Balancer Controller manages your ALBs, manually deleting an ALB leaves the corresponding Kubernetes resource (typically an Ingress) in a state that indicates the ALB still “exists.” This means the controller won’t automatically re-create the ALB because it doesn’t see a change that requires reconciliation.

To force re-creation, you can trigger a reconciliation of the Ingress resource. Here are two common approaches:

  1. Patch the Ingress with a Dummy Annotation

Updating the Ingress with a new annotation forces the controller to re-sync its state. For example, run:

kubectl annotate ingress <ingress-name> kubernetes.io/change=$(date +%s) --overwrite

This changes the metadata of the Ingress resource, prompting the AWS Load Balancer Controller to notice that the ALB is missing and create a new one.

  1. Delete and Re-create the Ingress

Another effective method is to delete the Ingress resource and then re-apply it:

kubectl delete ingress <ingress-name>
kubectl apply -f <ingress-manifest.yaml>

This approach clears the existing state, ensuring that the controller provisions a new ALB based on your configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment