When tearing down an EKS cluster, I need to wait a...
# general
i
When tearing down an EKS cluster, I need to wait after deleting an alb-ingress for the controller to notice the deletion and remove the associated AWS ALB. Is that possible to do?
f
How are you creating the EKS cluster?
i
Normal Pulumi script. I see customTimeouts but I don’t see a forced delay.
f
are you using the @pulumi/eks package?
Is it two separate resources that you're trying to do this with? If you have some code, that would help me understand better simple smile
i
It's not really an eks specific question I suppose. The ingress controller is being created with the Pulumi k8s package, e.g.,
return new k8s.extensions.v1beta1.Ingress
.
Which happens after the helm chart is run to create the controller that watches for new/updated/deleted ingress and services that reference ALBs.
return new k8s.helm.v2.Chart( 'aws-alb-ingress-controller', { repo: 'incubator', chart: 'aws-alb-ingress-controller', namespace: defaults.istioNamespace, values: { clusterName: clusterDetails.clusterName, awsRegion: config.region, awsVpcID: clusterDetails.vpcId, enableLivenessProbe: true, enableReadinessProbe: true, }, transformations: [setNamespace], }, { dependsOn: [this.istio], provider: this.k8sProvider }, );
(our corp restrictions prevent file uploads and kill the slack code posting)
So to recap, we use Helm to create the controller, then add the ingress which gets noticed by the controller and turned into an ALB.
The
pulumi destroy
works, but wipes out the controller before it has a chance to notice the ingress deletion and remove the ALB.