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:
- 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.
- 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.